Skip to content

Conversation

@zoumo
Copy link

@zoumo zoumo commented May 23, 2018

support cast string to string slice by comma

a b -> []string{"a", "b"}
a,b -> []string{"a", "b"}
a b,c -> []string{"a", "b,c"}

@CLAassistant
Copy link

CLAassistant commented May 23, 2018

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Jun Zhang seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@zoumo zoumo changed the title feat(StringSlice): support cast string to string slice by comma (#1) feat(StringSlice): support cast string to string slice by comma May 23, 2018
@zoumo
Copy link
Author

zoumo commented Jul 16, 2018

@bep

@bep
Copy link
Collaborator

bep commented Mar 18, 2019

I wish we could add this, but the introduction of comma, while it feels natural, would be breaking.

{"a,b", []string{"a", "b"}, false},

Someone may depend the above test case returning "a,b".

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.

3 participants