summaryrefslogtreecommitdiffhomepage
path: root/runsc/flag
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-08-27 03:27:43 +0000
committergVisor bot <gvisor-bot@google.com>2020-08-27 03:27:43 +0000
commitd27124946910f6025ce8f248831e8c356579a6c2 (patch)
tree6ed37bb2e84981b40708a8604e46130b8fb14040 /runsc/flag
parent6f5bd2d5be4fe63533bee65ba0fa767a08bc3c3f (diff)
parent32e7a54f7f413ba83af8217b9bc0a367e3c30f94 (diff)
Merge release-20200818.0-66-g32e7a54f7 (automated)
Diffstat (limited to 'runsc/flag')
-rw-r--r--runsc/flag/flag.go14
1 files changed, 10 insertions, 4 deletions
diff --git a/runsc/flag/flag.go b/runsc/flag/flag.go
index 0ca4829d7..ba1ff833f 100644
--- a/runsc/flag/flag.go
+++ b/runsc/flag/flag.go
@@ -21,13 +21,19 @@ import (
type FlagSet = flag.FlagSet
var (
- NewFlagSet = flag.NewFlagSet
- String = flag.String
Bool = flag.Bool
- Int = flag.Int
- Uint = flag.Uint
CommandLine = flag.CommandLine
+ Int = flag.Int
+ NewFlagSet = flag.NewFlagSet
Parse = flag.Parse
+ String = flag.String
+ Uint = flag.Uint
+ Var = flag.Var
)
const ContinueOnError = flag.ContinueOnError
+
+// Get returns the flag's underlying object.
+func Get(v flag.Value) interface{} {
+ return v.(flag.Getter).Get()
+}