From ee6079c0acef0126eb0fd2feafcedbd2650270ef Mon Sep 17 00:00:00 2001 From: Alan Donovan Date: Tue, 10 Nov 2015 14:32:36 -0500 Subject: [PATCH] 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 --- go/buildutil/tags.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/go/buildutil/tags.go b/go/buildutil/tags.go index 525ecb6c..486606f3 100644 --- a/go/buildutil/tags.go +++ b/go/buildutil/tags.go @@ -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.