diff options
author | Jhon Honce <jhonce@redhat.com> | 2021-09-13 14:29:22 -0700 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2021-09-16 09:42:14 -0400 |
commit | 74bc365eb6f036a87313ffe5acd3561d3c44638f (patch) | |
tree | a758b7fc4fe7e35c1cfd344c4d432e75160b50fe /pkg/bindings/images/types_diff_options.go | |
parent | e37883f13e6f9e659a044eaa5dba46bab166e3a6 (diff) | |
download | podman-74bc365eb6f036a87313ffe5acd3561d3c44638f.tar.gz podman-74bc365eb6f036a87313ffe5acd3561d3c44638f.tar.bz2 podman-74bc365eb6f036a87313ffe5acd3561d3c44638f.zip |
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 <jhonce@redhat.com>
Diffstat (limited to 'pkg/bindings/images/types_diff_options.go')
-rw-r--r-- | pkg/bindings/images/types_diff_options.go | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/pkg/bindings/images/types_diff_options.go b/pkg/bindings/images/types_diff_options.go index 5492323f6..658358e95 100644 --- a/pkg/bindings/images/types_diff_options.go +++ b/pkg/bindings/images/types_diff_options.go @@ -1,3 +1,4 @@ +// Code generated by go generate; DO NOT EDIT. package images import ( @@ -6,48 +7,42 @@ 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 *DiffOptions) Changed(fieldName string) bool { return util.Changed(o, fieldName) } -// ToParams +// ToParams formats struct fields to be passed to API service func (o *DiffOptions) ToParams() (url.Values, error) { return util.ToParams(o) } -// WithParent +// WithParent set field Parent to given value func (o *DiffOptions) WithParent(value string) *DiffOptions { - v := &value - o.Parent = v + o.Parent = &value return o } -// GetParent +// GetParent returns value of field Parent func (o *DiffOptions) GetParent() string { - var parent string if o.Parent == nil { - return parent + var z string + return z } return *o.Parent } -// WithDiffType +// WithDiffType set field DiffType to given value func (o *DiffOptions) WithDiffType(value string) *DiffOptions { - v := &value - o.DiffType = v + o.DiffType = &value return o } -// GetDiffType +// GetDiffType returns value of field DiffType func (o *DiffOptions) GetDiffType() string { - var diffType string if o.DiffType == nil { - return diffType + var z string + return z } return *o.DiffType } |