summaryrefslogtreecommitdiffhomepage
path: root/runsc/config/config.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-06-10 19:55:33 +0000
committergVisor bot <gvisor-bot@google.com>2021-06-10 19:55:33 +0000
commit203df401b853b9916b4a1cdec702f096fb5ed828 (patch)
treea9b8ce9a6f8b983fbd610e54bc6b6c1a761b5e99 /runsc/config/config.go
parent767289c84bbfc7bb98655924661d4ce850bb3070 (diff)
parent8d426b73818cf07aeee3db88478a00b80ad9aafe (diff)
Merge release-20210601.0-41-g8d426b738 (automated)
Diffstat (limited to 'runsc/config/config.go')
-rw-r--r--runsc/config/config.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/runsc/config/config.go b/runsc/config/config.go
index 1ff8e8f67..3d8c7a0ab 100644
--- a/runsc/config/config.go
+++ b/runsc/config/config.go
@@ -239,14 +239,14 @@ func (f *FileAccessType) Get() interface{} {
}
// String implements flag.Value.
-func (f *FileAccessType) String() string {
- switch *f {
+func (f FileAccessType) String() string {
+ switch f {
case FileAccessShared:
return "shared"
case FileAccessExclusive:
return "exclusive"
}
- panic(fmt.Sprintf("Invalid file access type %v", *f))
+ panic(fmt.Sprintf("Invalid file access type %d", f))
}
// NetworkType tells which network stack to use.
@@ -288,8 +288,8 @@ func (n *NetworkType) Get() interface{} {
}
// String implements flag.Value.
-func (n *NetworkType) String() string {
- switch *n {
+func (n NetworkType) String() string {
+ switch n {
case NetworkSandbox:
return "sandbox"
case NetworkHost:
@@ -297,7 +297,7 @@ func (n *NetworkType) String() string {
case NetworkNone:
return "none"
}
- panic(fmt.Sprintf("Invalid network type %v", *n))
+ panic(fmt.Sprintf("Invalid network type %d", n))
}
// QueueingDiscipline is used to specify the kind of Queueing Discipline to
@@ -335,14 +335,14 @@ func (q *QueueingDiscipline) Get() interface{} {
}
// String implements flag.Value.
-func (q *QueueingDiscipline) String() string {
- switch *q {
+func (q QueueingDiscipline) String() string {
+ switch q {
case QDiscNone:
return "none"
case QDiscFIFO:
return "fifo"
}
- panic(fmt.Sprintf("Invalid qdisc %v", *q))
+ panic(fmt.Sprintf("Invalid qdisc %d", q))
}
func leakModePtr(v refs.LeakMode) *refs.LeakMode {