From 401dcff8389e10c6fd88ad34f82daccb8f800d3f Mon Sep 17 00:00:00 2001 From: baude Date: Thu, 17 Dec 2020 12:07:13 -0600 Subject: podman v3 container bindings convert the golang container bindings to all use options so that changes in the future are more managable. Signed-off-by: baude --- pkg/bindings/network/types_connect_options.go | 6 +++--- pkg/bindings/network/types_create_options.go | 6 +++--- pkg/bindings/network/types_disconnect_options.go | 6 +++--- pkg/bindings/network/types_inspect_options.go | 6 +++--- pkg/bindings/network/types_list_options.go | 6 +++--- pkg/bindings/network/types_remove_options.go | 6 +++--- 6 files changed, 18 insertions(+), 18 deletions(-) (limited to 'pkg/bindings/network') diff --git a/pkg/bindings/network/types_connect_options.go b/pkg/bindings/network/types_connect_options.go index 22d1905e4..6fcc4536e 100644 --- a/pkg/bindings/network/types_connect_options.go +++ b/pkg/bindings/network/types_connect_options.go @@ -12,7 +12,7 @@ import ( /* This file is generated automatically by go generate. Do not edit. -Created 2020-12-16 11:59:06.213411549 -0600 CST m=+0.000201795 +Created 2020-12-18 15:58:34.075822786 -0600 CST m=+0.000167237 */ // Changed @@ -56,10 +56,10 @@ func (o *ConnectOptions) ToParams() (url.Values, error) { 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()) switch typ.Kind() { case reflect.String: - s, ok := slice.Interface().([]string) + sl := f.Slice(0, f.Len()) + s, ok := sl.Interface().([]string) if !ok { return nil, errors.New("failed to convert to string slice") } diff --git a/pkg/bindings/network/types_create_options.go b/pkg/bindings/network/types_create_options.go index 6af7929c4..e35762912 100644 --- a/pkg/bindings/network/types_create_options.go +++ b/pkg/bindings/network/types_create_options.go @@ -13,7 +13,7 @@ import ( /* This file is generated automatically by go generate. Do not edit. -Created 2020-12-16 11:59:05.523424301 -0600 CST m=+0.000180953 +Created 2020-12-18 15:58:33.37307678 -0600 CST m=+0.000176739 */ // Changed @@ -57,10 +57,10 @@ func (o *CreateOptions) ToParams() (url.Values, error) { 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()) switch typ.Kind() { case reflect.String: - s, ok := slice.Interface().([]string) + sl := f.Slice(0, f.Len()) + s, ok := sl.Interface().([]string) if !ok { return nil, errors.New("failed to convert to string slice") } diff --git a/pkg/bindings/network/types_disconnect_options.go b/pkg/bindings/network/types_disconnect_options.go index 183032998..821279976 100644 --- a/pkg/bindings/network/types_disconnect_options.go +++ b/pkg/bindings/network/types_disconnect_options.go @@ -12,7 +12,7 @@ import ( /* This file is generated automatically by go generate. Do not edit. -Created 2020-12-16 11:59:06.07634068 -0600 CST m=+0.000179587 +Created 2020-12-18 15:58:33.936088242 -0600 CST m=+0.000168680 */ // Changed @@ -56,10 +56,10 @@ func (o *DisconnectOptions) ToParams() (url.Values, error) { 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()) switch typ.Kind() { case reflect.String: - s, ok := slice.Interface().([]string) + sl := f.Slice(0, f.Len()) + s, ok := sl.Interface().([]string) if !ok { return nil, errors.New("failed to convert to string slice") } diff --git a/pkg/bindings/network/types_inspect_options.go b/pkg/bindings/network/types_inspect_options.go index 91adac8f4..7704904ce 100644 --- a/pkg/bindings/network/types_inspect_options.go +++ b/pkg/bindings/network/types_inspect_options.go @@ -12,7 +12,7 @@ import ( /* This file is generated automatically by go generate. Do not edit. -Created 2020-12-16 11:59:05.661597872 -0600 CST m=+0.000168252 +Created 2020-12-18 15:58:33.520438264 -0600 CST m=+0.000172934 */ // Changed @@ -56,10 +56,10 @@ func (o *InspectOptions) ToParams() (url.Values, error) { 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()) switch typ.Kind() { case reflect.String: - s, ok := slice.Interface().([]string) + sl := f.Slice(0, f.Len()) + s, ok := sl.Interface().([]string) if !ok { return nil, errors.New("failed to convert to string slice") } diff --git a/pkg/bindings/network/types_list_options.go b/pkg/bindings/network/types_list_options.go index 3f1909ee1..bbd2a71db 100644 --- a/pkg/bindings/network/types_list_options.go +++ b/pkg/bindings/network/types_list_options.go @@ -12,7 +12,7 @@ import ( /* This file is generated automatically by go generate. Do not edit. -Created 2020-12-16 11:59:05.936262707 -0600 CST m=+0.000172058 +Created 2020-12-18 15:58:33.796794129 -0600 CST m=+0.000180368 */ // Changed @@ -56,10 +56,10 @@ func (o *ListOptions) ToParams() (url.Values, error) { 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()) switch typ.Kind() { case reflect.String: - s, ok := slice.Interface().([]string) + sl := f.Slice(0, f.Len()) + s, ok := sl.Interface().([]string) if !ok { return nil, errors.New("failed to convert to string slice") } diff --git a/pkg/bindings/network/types_remove_options.go b/pkg/bindings/network/types_remove_options.go index 5f3dc70ec..b24835ae4 100644 --- a/pkg/bindings/network/types_remove_options.go +++ b/pkg/bindings/network/types_remove_options.go @@ -12,7 +12,7 @@ import ( /* This file is generated automatically by go generate. Do not edit. -Created 2020-12-16 11:59:05.798818224 -0600 CST m=+0.000173420 +Created 2020-12-18 15:58:33.658228151 -0600 CST m=+0.000172527 */ // Changed @@ -56,10 +56,10 @@ func (o *RemoveOptions) ToParams() (url.Values, error) { 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()) switch typ.Kind() { case reflect.String: - s, ok := slice.Interface().([]string) + sl := f.Slice(0, f.Len()) + s, ok := sl.Interface().([]string) if !ok { return nil, errors.New("failed to convert to string slice") } -- cgit v1.2.3-54-g00ecf