summaryrefslogtreecommitdiff
path: root/pkg/spec/parse.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-02-19 23:49:06 +0100
committerGitHub <noreply@github.com>2020-02-19 23:49:06 +0100
commite561280510e4ef5fc4100811a971d134b01c72a9 (patch)
tree63bdda9690847c269079ea531e7beacc5eb7fe22 /pkg/spec/parse.go
parentf2bcc9cc7dc8b1937f39db503db96651d84c3e3e (diff)
parentd65ff6b3ec18aad6a64329c54a83d5ba5d51b62f (diff)
downloadpodman-e561280510e4ef5fc4100811a971d134b01c72a9.tar.gz
podman-e561280510e4ef5fc4100811a971d134b01c72a9.tar.bz2
podman-e561280510e4ef5fc4100811a971d134b01c72a9.zip
Merge pull request #5204 from baude/apiv2createlibpod
apiv2 container create using specgen
Diffstat (limited to 'pkg/spec/parse.go')
-rw-r--r--pkg/spec/parse.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/pkg/spec/parse.go b/pkg/spec/parse.go
index a5dfccdb9..38d93b87f 100644
--- a/pkg/spec/parse.go
+++ b/pkg/spec/parse.go
@@ -19,12 +19,12 @@ const Pod = "pod"
// weightDevice is a structure that holds device:weight pair
type weightDevice struct {
- path string
- weight uint16
+ Path string
+ Weight uint16
}
func (w *weightDevice) String() string {
- return fmt.Sprintf("%s:%d", w.path, w.weight)
+ return fmt.Sprintf("%s:%d", w.Path, w.Weight)
}
// LinuxNS is a struct that contains namespace information
@@ -59,9 +59,9 @@ func NS(s string) string {
return ""
}
-// validateweightDevice validates that the specified string has a valid device-weight format
+// ValidateweightDevice validates that the specified string has a valid device-weight format
// for blkio-weight-device flag
-func validateweightDevice(val string) (*weightDevice, error) {
+func ValidateweightDevice(val string) (*weightDevice, error) {
split := strings.SplitN(val, ":", 2)
if len(split) != 2 {
return nil, fmt.Errorf("bad format: %s", val)
@@ -78,8 +78,8 @@ func validateweightDevice(val string) (*weightDevice, error) {
}
return &weightDevice{
- path: split[0],
- weight: uint16(weight),
+ Path: split[0],
+ Weight: uint16(weight),
}, nil
}