From 74bc365eb6f036a87313ffe5acd3561d3c44638f Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Mon, 13 Sep 2021 14:29:22 -0700 Subject: Enhance bindings for IDE hints * Follow https://pkg.go.dev/cmd/go#hdr-Generate_Go_files_by_processing_source for leading comment * Add godoc strings for all exposed methods for IDE support * Copy field godoc strings into generated code as function godoc string * Remove unused/unnecessary fields from generator.go structures * Cleanup code regarding template usage Signed-off-by: Jhon Honce --- pkg/bindings/secrets/types_list_options.go | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'pkg/bindings/secrets/types_list_options.go') diff --git a/pkg/bindings/secrets/types_list_options.go b/pkg/bindings/secrets/types_list_options.go index e4501dde8..87b657ff9 100644 --- a/pkg/bindings/secrets/types_list_options.go +++ b/pkg/bindings/secrets/types_list_options.go @@ -1,3 +1,4 @@ +// Code generated by go generate; DO NOT EDIT. package secrets import ( @@ -6,32 +7,27 @@ import ( "github.com/containers/podman/v3/pkg/bindings/internal/util" ) -/* -This file is generated automatically by go generate. Do not edit. -*/ - -// Changed +// Changed returns true if named field has been set func (o *ListOptions) Changed(fieldName string) bool { return util.Changed(o, fieldName) } -// ToParams +// ToParams formats struct fields to be passed to API service func (o *ListOptions) ToParams() (url.Values, error) { return util.ToParams(o) } -// WithFilters +// WithFilters set field Filters to given value func (o *ListOptions) WithFilters(value map[string][]string) *ListOptions { - v := value - o.Filters = v + o.Filters = value return o } -// GetFilters +// GetFilters returns value of field Filters func (o *ListOptions) GetFilters() map[string][]string { - var filters map[string][]string if o.Filters == nil { - return filters + var z map[string][]string + return z } return o.Filters } -- cgit v1.2.3-54-g00ecf