Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StringToSlice now trims white space on each item in the slice #40

Merged
merged 1 commit into from
Jul 5, 2017

Conversation

thrawn01
Copy link
Owner

@thrawn01 thrawn01 commented Jul 5, 2017

Purpose

Allow users to trim and modify slice items during parse. Addresses #39

Implementation

// Returns []string{"one"}
result := args.StringToSlice("one")

// Returns []string{"one", "two", "three"}
result := args.StringToSlice("one, two, three", strings.TrimSpace)

// Returns []string{"ONE", "TWO", "THREE"}
result := args.StringToSlice("one, two, three", strings.ToUpper, strings.TrimSpace)

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 67.878% when pulling ffe2f2c on trim-whitespace-StringToSlice into d582419 on master.

@thrawn01 thrawn01 force-pushed the trim-whitespace-StringToSlice branch from ffe2f2c to a922f25 Compare July 5, 2017 22:36
@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 67.878% when pulling a922f25 on trim-whitespace-StringToSlice into d582419 on master.

@thrawn01 thrawn01 force-pushed the trim-whitespace-StringToSlice branch from a922f25 to 5a4d17f Compare July 5, 2017 22:41
@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 67.782% when pulling 5a4d17f on trim-whitespace-StringToSlice into d582419 on master.

@thrawn01 thrawn01 merged commit 1cbcd84 into master Jul 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants