diff options
author | Jhon Honce <jhonce@redhat.com> | 2021-09-13 14:29:22 -0700 |
---|---|---|
committer | Jhon Honce <jhonce@redhat.com> | 2021-09-14 07:47:24 -0700 |
commit | d7256be807890892c988cc7d270e3d1bf951397c (patch) | |
tree | 53fadc1842f3de6a7c62ab97c8e16f15b0dc4484 /pkg/bindings/pods/types_stop_options.go | |
parent | b603c7a4b91d30b33ce987740156f46804f24074 (diff) | |
download | podman-d7256be807890892c988cc7d270e3d1bf951397c.tar.gz podman-d7256be807890892c988cc7d270e3d1bf951397c.tar.bz2 podman-d7256be807890892c988cc7d270e3d1bf951397c.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/pods/types_stop_options.go')
-rw-r--r-- | pkg/bindings/pods/types_stop_options.go | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/pkg/bindings/pods/types_stop_options.go b/pkg/bindings/pods/types_stop_options.go index 443c9120f..a96f41d1d 100644 --- a/pkg/bindings/pods/types_stop_options.go +++ b/pkg/bindings/pods/types_stop_options.go @@ -1,3 +1,4 @@ +// Code generated by go generate; DO NOT EDIT. package pods 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 *StopOptions) Changed(fieldName string) bool { return util.Changed(o, fieldName) } -// ToParams +// ToParams formats struct fields to be passed to API service func (o *StopOptions) ToParams() (url.Values, error) { return util.ToParams(o) } -// WithTimeout +// WithTimeout set field Timeout to given value func (o *StopOptions) WithTimeout(value int) *StopOptions { - v := &value - o.Timeout = v + o.Timeout = &value return o } -// GetTimeout +// GetTimeout returns value of field Timeout func (o *StopOptions) GetTimeout() int { - var timeout int if o.Timeout == nil { - return timeout + var z int + return z } return *o.Timeout } |