From d498ef53aa71066aec7771ebb7316bf3eb3d4cde Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Fri, 18 Dec 2020 16:46:09 +0100 Subject: Makefile: add target to generate bindings Add a `.generate-bindings` make target that only runs in the absence of the `.generate-bindings` file or when a `types.go` file below `pkg/bindings` has changed. This will regenerate the go bindings and make sure the code is up2date. Signed-off-by: Valentin Rothberg Signed-off-by: Daniel J Walsh --- pkg/bindings/manifests/types_add_options.go | 4 ++-- pkg/bindings/manifests/types_create_options.go | 4 ++-- pkg/bindings/manifests/types_inspect_options.go | 4 ++-- pkg/bindings/manifests/types_push_options.go | 4 ++-- pkg/bindings/manifests/types_remove_options.go | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) (limited to 'pkg/bindings/manifests') diff --git a/pkg/bindings/manifests/types_add_options.go b/pkg/bindings/manifests/types_add_options.go index d45effedc..1e588c668 100644 --- a/pkg/bindings/manifests/types_add_options.go +++ b/pkg/bindings/manifests/types_add_options.go @@ -4,6 +4,7 @@ import ( "net/url" "reflect" "strconv" + "strings" jsoniter "github.com/json-iterator/go" "github.com/pkg/errors" @@ -11,8 +12,6 @@ import ( /* This file is generated automatically by go generate. Do not edit. - -Created 2020-12-18 15:57:55.92237379 -0600 CST m=+0.000150701 */ // Changed @@ -39,6 +38,7 @@ func (o *AddOptions) ToParams() (url.Values, error) { if !o.Changed(fieldName) { continue } + fieldName = strings.ToLower(fieldName) f := s.Field(i) if reflect.Ptr == f.Kind() { f = f.Elem() diff --git a/pkg/bindings/manifests/types_create_options.go b/pkg/bindings/manifests/types_create_options.go index da07f1abf..3a564a92b 100644 --- a/pkg/bindings/manifests/types_create_options.go +++ b/pkg/bindings/manifests/types_create_options.go @@ -4,6 +4,7 @@ import ( "net/url" "reflect" "strconv" + "strings" jsoniter "github.com/json-iterator/go" "github.com/pkg/errors" @@ -11,8 +12,6 @@ import ( /* This file is generated automatically by go generate. Do not edit. - -Created 2020-12-18 15:57:55.784206871 -0600 CST m=+0.000157049 */ // Changed @@ -39,6 +38,7 @@ func (o *CreateOptions) ToParams() (url.Values, error) { if !o.Changed(fieldName) { continue } + fieldName = strings.ToLower(fieldName) f := s.Field(i) if reflect.Ptr == f.Kind() { f = f.Elem() diff --git a/pkg/bindings/manifests/types_inspect_options.go b/pkg/bindings/manifests/types_inspect_options.go index 0d32d5bb9..2af4190d4 100644 --- a/pkg/bindings/manifests/types_inspect_options.go +++ b/pkg/bindings/manifests/types_inspect_options.go @@ -4,6 +4,7 @@ import ( "net/url" "reflect" "strconv" + "strings" jsoniter "github.com/json-iterator/go" "github.com/pkg/errors" @@ -11,8 +12,6 @@ import ( /* This file is generated automatically by go generate. Do not edit. - -Created 2020-12-18 15:57:55.631746481 -0600 CST m=+0.000143104 */ // Changed @@ -39,6 +38,7 @@ func (o *InspectOptions) ToParams() (url.Values, error) { if !o.Changed(fieldName) { continue } + fieldName = strings.ToLower(fieldName) f := s.Field(i) if reflect.Ptr == f.Kind() { f = f.Elem() diff --git a/pkg/bindings/manifests/types_push_options.go b/pkg/bindings/manifests/types_push_options.go index 4226733c9..1d689f699 100644 --- a/pkg/bindings/manifests/types_push_options.go +++ b/pkg/bindings/manifests/types_push_options.go @@ -4,6 +4,7 @@ import ( "net/url" "reflect" "strconv" + "strings" jsoniter "github.com/json-iterator/go" "github.com/pkg/errors" @@ -11,8 +12,6 @@ import ( /* This file is generated automatically by go generate. Do not edit. - -Created 2020-12-18 15:57:56.197438009 -0600 CST m=+0.000149060 */ // Changed @@ -39,6 +38,7 @@ func (o *PushOptions) ToParams() (url.Values, error) { if !o.Changed(fieldName) { continue } + fieldName = strings.ToLower(fieldName) f := s.Field(i) if reflect.Ptr == f.Kind() { f = f.Elem() diff --git a/pkg/bindings/manifests/types_remove_options.go b/pkg/bindings/manifests/types_remove_options.go index f99220f6c..3b35c38b8 100644 --- a/pkg/bindings/manifests/types_remove_options.go +++ b/pkg/bindings/manifests/types_remove_options.go @@ -4,6 +4,7 @@ import ( "net/url" "reflect" "strconv" + "strings" jsoniter "github.com/json-iterator/go" "github.com/pkg/errors" @@ -11,8 +12,6 @@ import ( /* This file is generated automatically by go generate. Do not edit. - -Created 2020-12-18 15:57:56.059954408 -0600 CST m=+0.000146015 */ // Changed @@ -39,6 +38,7 @@ func (o *RemoveOptions) ToParams() (url.Values, error) { if !o.Changed(fieldName) { continue } + fieldName = strings.ToLower(fieldName) f := s.Field(i) if reflect.Ptr == f.Kind() { f = f.Elem() -- cgit v1.2.3-54-g00ecf