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:
parent
4828f5cb61
commit
ee6079c0ac
|
@ -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 " +
|
||||
"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
|
||||
// populates a []string slice.
|
||||
//
|
||||
|
@ -28,6 +28,8 @@ func (v *TagsFlag) Set(s string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
func (v *TagsFlag) Get() interface{} { return *v }
|
||||
|
||||
func splitQuotedFields(s string) ([]string, error) {
|
||||
// Split fields allowing '' or "" around elements.
|
||||
// Quotes further inside the string do not count.
|
||||
|
|
Loading…
Reference in New Issue