summaryrefslogtreecommitdiff
path: root/pkg/bindings/generate
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2020-12-17 12:07:13 -0600
committerbaude <bbaude@redhat.com>2020-12-21 09:21:46 -0600
commit401dcff8389e10c6fd88ad34f82daccb8f800d3f (patch)
tree2ccb5389ef46b53329911acf8d0fd5aa16a7b74f /pkg/bindings/generate
parentd6925182cdaf94225908a386d02eae8fd3e01123 (diff)
downloadpodman-401dcff8389e10c6fd88ad34f82daccb8f800d3f.tar.gz
podman-401dcff8389e10c6fd88ad34f82daccb8f800d3f.tar.bz2
podman-401dcff8389e10c6fd88ad34f82daccb8f800d3f.zip
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 <bbaude@redhat.com>
Diffstat (limited to 'pkg/bindings/generate')
-rw-r--r--pkg/bindings/generate/types_kube_options.go6
-rw-r--r--pkg/bindings/generate/types_systemd_options.go6
2 files changed, 6 insertions, 6 deletions
diff --git a/pkg/bindings/generate/types_kube_options.go b/pkg/bindings/generate/types_kube_options.go
index fbb26f554..68488aaee 100644
--- a/pkg/bindings/generate/types_kube_options.go
+++ b/pkg/bindings/generate/types_kube_options.go
@@ -12,7 +12,7 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-Created 2020-12-17 09:35:23.528143172 -0600 CST m=+0.000203394
+Created 2020-12-18 15:58:20.522950566 -0600 CST m=+0.000154384
*/
// Changed
@@ -56,10 +56,10 @@ func (o *KubeOptions) 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/generate/types_systemd_options.go b/pkg/bindings/generate/types_systemd_options.go
index 20e032f5a..0e8a46aa0 100644
--- a/pkg/bindings/generate/types_systemd_options.go
+++ b/pkg/bindings/generate/types_systemd_options.go
@@ -12,7 +12,7 @@ import (
/*
This file is generated automatically by go generate. Do not edit.
-Created 2020-12-17 09:35:23.663318384 -0600 CST m=+0.000158454
+Created 2020-12-18 15:58:20.661450253 -0600 CST m=+0.000135779
*/
// Changed
@@ -56,10 +56,10 @@ func (o *SystemdOptions) 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")
}