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

go-fuzz-build: added support for '-tags' #151

Merged
merged 1 commit into from
Feb 14, 2017

Conversation

obscuren
Copy link
Contributor

Please let me know if this is something that might be of interest and/or if you want me to expand further.

@@ -24,6 +24,7 @@ import (
)

var (
flagTag = flag.String("tags", "", "a list of build tags to consider satisfied during the build.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@obscuren obscuren Feb 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I was not aware there was a tags flag

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that I'm looking at it I'm not sure I want to pull in a new package just for a flag. I'll let @dvyukov decide on whether he'd like this or not.

if len(*flagTag) > 0 {
tags += " " + *flagTag
}
return tags
Copy link
Contributor

@Kubuxu Kubuxu Feb 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Joined tags should have form -tags="tagA tagB" try it out for yourself.

See also: golang/go#8772 (comment)

Thins get a bit tricky when you have multiple tags in play.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, indeed. This works though, it should be a space separated list of tags.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you mean that they need to be quoted, that's handled by the exec.Command

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, rigth, sorry.

@@ -24,6 +24,7 @@ import (
)

var (
flagTag = flag.String("tags", "", "a list of build tags to consider satisfied during the build.")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/a list/a space-separated list/ please
also no dot at the end, other flags don't use dots

@dvyukov
Copy link
Owner

dvyukov commented Feb 14, 2017

Otherwise looks good.

@obscuren
Copy link
Contributor Author

Done

@dvyukov
Copy link
Owner

dvyukov commented Feb 14, 2017

Thanks!

@dvyukov dvyukov merged commit 0ef47e1 into dvyukov:master Feb 14, 2017
@obscuren obscuren deleted the tag-support branch February 14, 2017 10:09
AlekSi pushed a commit to AlekSi/go-fuzz that referenced this pull request Feb 6, 2018
go-fuzz-build: added support for '-tags'
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