go/buildutil: add (*TagsFlag).Get method to satisfy Getter interface

Change-Id: I8a52a1cc006608ff87d1436d14c836b6e9c7d6d4
Reviewed-on: https://go-review.googlesource.com/16810
Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
Alan Donovan 2015-11-10 14:32:36 -05:00
parent 4828f5cb61
commit ee6079c0ac
1 changed files with 3 additions and 1 deletions

View File

@ -8,7 +8,7 @@ const TagsFlagDoc = "a list of `build tags` to consider satisfied during the bui
"For more information about build tags, see the description of " + "For more information about build tags, see the description of " +
"build constraints in the documentation for the go/build package" "build constraints in the documentation for the go/build package"
// TagsFlag is an implementation of the flag.Value interface that parses // TagsFlag is an implementation of the flag.Value and flag.Getter interfaces that parses
// a flag value in the same manner as go build's -tags flag and // a flag value in the same manner as go build's -tags flag and
// populates a []string slice. // populates a []string slice.
// //
@ -28,6 +28,8 @@ func (v *TagsFlag) Set(s string) error {
return err return err
} }
func (v *TagsFlag) Get() interface{} { return *v }
func splitQuotedFields(s string) ([]string, error) { func splitQuotedFields(s string) ([]string, error) {
// Split fields allowing '' or "" around elements. // Split fields allowing '' or "" around elements.
// Quotes further inside the string do not count. // Quotes further inside the string do not count.