summaryrefslogtreecommitdiff
path: root/pkg/bindings/generator
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-12-17 17:22:37 +0000
committerGitHub <noreply@github.com>2020-12-17 17:22:37 +0000
commita17afa931d1aa73b8657cf26de3b49841837f66d (patch)
tree8b3e3408eea4fa15320f5c294d96b8e134bf49c4 /pkg/bindings/generator
parent033336606f8aa9687cbdff5450c691b48d45e8e6 (diff)
parent86335aa4ae01dadecd36468409d742e68b76925d (diff)
downloadpodman-a17afa931d1aa73b8657cf26de3b49841837f66d.tar.gz
podman-a17afa931d1aa73b8657cf26de3b49841837f66d.tar.bz2
podman-a17afa931d1aa73b8657cf26de3b49841837f66d.zip
Merge pull request #8752 from baude/bindings3volumes
misc bindings to podman v3
Diffstat (limited to 'pkg/bindings/generator')
-rw-r--r--pkg/bindings/generator/generator.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/bindings/generator/generator.go b/pkg/bindings/generator/generator.go
index 2ebe35282..1fd428451 100644
--- a/pkg/bindings/generator/generator.go
+++ b/pkg/bindings/generator/generator.go
@@ -64,6 +64,9 @@ func (o *{{.StructName}}) ToParams() (url.Values, error) {
case reflect.Int, reflect.Int64:
// f.Int() is always an int64
params.Set(fieldName, strconv.FormatInt(f.Int(), 10))
+ case reflect.Uint, reflect.Uint64:
+ // f.Uint() is always an uint64
+ params.Set(fieldName, strconv.FormatUint(f.Uint(), 10))
case reflect.Slice:
typ := reflect.TypeOf(f.Interface()).Elem()
slice := reflect.MakeSlice(reflect.SliceOf(typ), f.Len(), f.Cap())
@@ -92,8 +95,6 @@ func (o *{{.StructName}}) ToParams() (url.Values, error) {
}
params.Set(fieldName, s)
- default:
- return nil, errors.Errorf("unknown type %s", f.Kind().String())
}
}
return params, nil