From 86335aa4ae01dadecd36468409d742e68b76925d Mon Sep 17 00:00:00 2001 From: baude Date: Mon, 14 Dec 2020 11:33:25 -0600 Subject: misc bindings to podman v3 manifest, system, info, volumes, play, and generate bindings are updated to always have binding options. Signed-off-by: baude --- pkg/bindings/generator/generator.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pkg/bindings/generator') 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 -- cgit v1.2.3-54-g00ecf