Enable whitespace linter
Use the whitespace linter and fix the reported problems. [NO TESTS NEEDED] Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
This commit is contained in:
parent
69ab67bf90
commit
78c8a87362
|
|
@ -39,7 +39,6 @@ linters:
|
|||
- staticcheck
|
||||
- forbidigo
|
||||
- exhaustive
|
||||
- whitespace
|
||||
- unparam
|
||||
- gofumpt
|
||||
- gci
|
||||
|
|
|
|||
|
|
@ -804,5 +804,4 @@ func DefineCreateFlags(cmd *cobra.Command, cf *ContainerCLIOpts) {
|
|||
"Configure cgroup v2 (key=value)",
|
||||
)
|
||||
_ = cmd.RegisterFlagCompletionFunc(cgroupConfFlagName, completion.AutocompleteNone)
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -269,7 +269,6 @@ func ContainerCreateToContainerCLIOpts(cc handlers.CreateContainerConfig, cgroup
|
|||
endpointsConfig := cc.NetworkingConfig.EndpointsConfig
|
||||
cniNetworks := make([]string, 0, len(endpointsConfig))
|
||||
for netName, endpoint := range endpointsConfig {
|
||||
|
||||
cniNetworks = append(cniNetworks, netName)
|
||||
|
||||
if endpoint == nil {
|
||||
|
|
|
|||
|
|
@ -26,5 +26,4 @@ func (c *ContainerCLIOpts) validate() error {
|
|||
return errors.Errorf("invalid image-volume type %q. Pick one of bind, tmpfs, or ignore", c.ImageVolume)
|
||||
}
|
||||
return nil
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@ func init() {
|
|||
})
|
||||
attachFlags(containerAttachCommand)
|
||||
validate.AddLatestFlag(containerAttachCommand, &attachOpts.Latest)
|
||||
|
||||
}
|
||||
|
||||
func attach(cmd *cobra.Command, args []string) error {
|
||||
|
|
|
|||
|
|
@ -118,5 +118,4 @@ func restore(_ *cobra.Command, args []string) error {
|
|||
}
|
||||
}
|
||||
return errs.PrintErrors()
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@ func waitFlags(cmd *cobra.Command) {
|
|||
conditionFlagName := "condition"
|
||||
flags.StringVar(&waitCondition, conditionFlagName, "stopped", "Condition to wait on")
|
||||
_ = cmd.RegisterFlagCompletionFunc(conditionFlagName, common.AutocompleteWaitCondition)
|
||||
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -128,7 +128,6 @@ func systemd(cmd *cobra.Command, args []string) error {
|
|||
default:
|
||||
return errors.Errorf("unknown --format argument: %s", format)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func printDefault(units map[string]string) error {
|
||||
|
|
|
|||
|
|
@ -275,7 +275,6 @@ func tokenRepoTag(ref string) (string, string, error) {
|
|||
}
|
||||
|
||||
return name, tag, nil
|
||||
|
||||
}
|
||||
|
||||
func sortFunc(key string, data []imageReporter) func(i, j int) bool {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@ func init() {
|
|||
flags.StringArrayVar(&filter, filterFlagName, []string{}, "Provide filter values (e.g. 'label=<key>=<value>')")
|
||||
//TODO: add completion for filters
|
||||
_ = pruneCmd.RegisterFlagCompletionFunc(filterFlagName, completion.AutocompleteNone)
|
||||
|
||||
}
|
||||
|
||||
func prune(cmd *cobra.Command, args []string) error {
|
||||
|
|
|
|||
|
|
@ -110,11 +110,9 @@ func pullFlags(cmd *cobra.Command) {
|
|||
_ = cmd.RegisterFlagCompletionFunc(authfileFlagName, completion.AutocompleteDefault)
|
||||
|
||||
if !registry.IsRemote() {
|
||||
|
||||
certDirFlagName := "cert-dir"
|
||||
flags.StringVar(&pullOptions.CertDir, certDirFlagName, "", "`Pathname` of a directory containing TLS certificates and keys")
|
||||
_ = cmd.RegisterFlagCompletionFunc(certDirFlagName, completion.AutocompleteDefault)
|
||||
|
||||
}
|
||||
_ = flags.MarkHidden("signature-policy")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ func init() {
|
|||
_ = showFlags.MarkHidden("policypath")
|
||||
showFlags.StringVar(&showTrustOptions.RegistryPath, "registrypath", "", "")
|
||||
_ = showFlags.MarkHidden("registrypath")
|
||||
|
||||
}
|
||||
|
||||
func showTrust(cmd *cobra.Command, args []string) error {
|
||||
|
|
|
|||
|
|
@ -80,7 +80,6 @@ func init() {
|
|||
Parent: networkCmd,
|
||||
})
|
||||
networkCreateFlags(networkCreateCommand)
|
||||
|
||||
}
|
||||
|
||||
func networkCreate(cmd *cobra.Command, args []string) error {
|
||||
|
|
|
|||
|
|
@ -39,5 +39,4 @@ func init() {
|
|||
func networkInspect(_ *cobra.Command, args []string) error {
|
||||
inspectOpts.Type = inspect.NetworkType
|
||||
return inspect.Inspect(args, *inspectOpts)
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ func networkListFlags(flags *pflag.FlagSet) {
|
|||
filterFlagName := "filter"
|
||||
flags.StringArrayVarP(&filters, filterFlagName, "f", nil, "Provide filter values (e.g. 'name=podman')")
|
||||
_ = networklistCommand.RegisterFlagCompletionFunc(filterFlagName, common.AutocompleteNetworkFilters)
|
||||
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -77,7 +77,6 @@ func init() {
|
|||
_ = kubeCmd.RegisterFlagCompletionFunc(authfileFlagName, completion.AutocompleteDefault)
|
||||
|
||||
if !registry.IsRemote() {
|
||||
|
||||
certDirFlagName := "cert-dir"
|
||||
flags.StringVar(&kubeOptions.CertDir, certDirFlagName, "", "`Pathname` of a directory containing TLS certificates and keys")
|
||||
_ = kubeCmd.RegisterFlagCompletionFunc(certDirFlagName, completion.AutocompleteDefault)
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ func init() {
|
|||
}
|
||||
|
||||
func inspect(cmd *cobra.Command, args []string) error {
|
||||
|
||||
if len(args) < 1 && !inspectOptions.Latest {
|
||||
return errors.Errorf("you must provide the name or id of a running pod")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,6 @@ func create(cmd *cobra.Command, args []string) error {
|
|||
}
|
||||
if (stat.Mode() & os.ModeNamedPipe) == 0 {
|
||||
return errors.New("if `-` is used, data must be passed into stdin")
|
||||
|
||||
}
|
||||
reader = os.Stdin
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@ func init() {
|
|||
formatFlagName := "format"
|
||||
flags.StringVar(&listFlag.format, formatFlagName, "{{.ID}}\t{{.Name}}\t{{.Driver}}\t{{.CreatedAt}}\t{{.UpdatedAt}}\t\n", "Format volume output using Go template")
|
||||
_ = lsCmd.RegisterFlagCompletionFunc(formatFlagName, common.AutocompleteJSONFormat)
|
||||
|
||||
}
|
||||
|
||||
func ls(cmd *cobra.Command, args []string) error {
|
||||
|
|
@ -65,7 +64,6 @@ func ls(cmd *cobra.Command, args []string) error {
|
|||
UpdatedAt: units.HumanDuration(time.Since(response.UpdatedAt)) + " ago",
|
||||
Driver: response.Spec.Driver.Name,
|
||||
})
|
||||
|
||||
}
|
||||
return outputTemplate(cmd, listed)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,14 +26,11 @@ import (
|
|||
)
|
||||
|
||||
func TestShellCompletionFunctions(t *testing.T) {
|
||||
|
||||
rootCmd := parseCommands()
|
||||
checkCommand(t, rootCmd)
|
||||
|
||||
}
|
||||
|
||||
func checkCommand(t *testing.T, cmd *cobra.Command) {
|
||||
|
||||
if cmd.HasSubCommands() {
|
||||
for _, childCmd := range cmd.Commands() {
|
||||
checkCommand(t, childCmd)
|
||||
|
|
@ -46,7 +43,6 @@ func checkCommand(t *testing.T, cmd *cobra.Command) {
|
|||
|
||||
// loop over all local flags
|
||||
cmd.LocalFlags().VisitAll(func(flag *pflag.Flag) {
|
||||
|
||||
// an error means that there is a completion function for this flag
|
||||
err := cmd.RegisterFlagCompletionFunc(flag.Name, func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||
return nil, cobra.ShellCompDirectiveDefault
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ func init() {
|
|||
formatFlagName := "format"
|
||||
flags.StringVar(&dfOptions.Format, formatFlagName, "", "Pretty-print images using a Go template")
|
||||
_ = dfSystemCommand.RegisterFlagCompletionFunc(formatFlagName, completion.AutocompleteNone)
|
||||
|
||||
}
|
||||
|
||||
func df(cmd *cobra.Command, args []string) error {
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ func init() {
|
|||
filterFlagName := "filter"
|
||||
flags.StringArrayVar(&filters, filterFlagName, []string{}, "Provide filter values (e.g. 'label=<key>=<value>')")
|
||||
_ = pruneCommand.RegisterFlagCompletionFunc(filterFlagName, completion.AutocompleteNone)
|
||||
|
||||
}
|
||||
|
||||
func prune(cmd *cobra.Command, args []string) error {
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ func init() {
|
|||
Command: renumberCommand,
|
||||
Parent: systemCmd,
|
||||
})
|
||||
|
||||
}
|
||||
func renumber(cmd *cobra.Command, args []string) {
|
||||
// Shutdown all running engines, `renumber` will hijack all methods
|
||||
|
|
|
|||
|
|
@ -904,7 +904,6 @@ func (s *BoltState) ContainerInUse(ctr *Container) ([]string, error) {
|
|||
}
|
||||
|
||||
return depCtrs, nil
|
||||
|
||||
}
|
||||
|
||||
// AllContainers retrieves all the containers in the database
|
||||
|
|
@ -962,7 +961,6 @@ func (s *BoltState) AllContainers() ([]*Container, error) {
|
|||
}
|
||||
|
||||
return nil
|
||||
|
||||
})
|
||||
})
|
||||
if err != nil {
|
||||
|
|
@ -2580,7 +2578,6 @@ func (s *BoltState) LookupVolume(name string) (*Volume, error) {
|
|||
}
|
||||
|
||||
return volume, nil
|
||||
|
||||
}
|
||||
|
||||
// HasVolume returns true if the given volume exists in the state, otherwise it returns false
|
||||
|
|
|
|||
|
|
@ -1057,7 +1057,6 @@ func (c *Container) NetworkDisabled() (bool, error) {
|
|||
return container.NetworkDisabled()
|
||||
}
|
||||
return networkDisabled(c)
|
||||
|
||||
}
|
||||
|
||||
func networkDisabled(c *Container) (bool, error) {
|
||||
|
|
|
|||
|
|
@ -796,7 +796,6 @@ func (c *Container) generateInspectContainerHostConfig(ctrSpec *spec.Spec, named
|
|||
if c.config.UTSNsCtr != "" {
|
||||
utsMode = fmt.Sprintf("container:%s", c.config.UTSNsCtr)
|
||||
} else if ctrSpec.Linux != nil {
|
||||
|
||||
// Locate the spec's UTS namespace.
|
||||
// If there is none, it's uts=host.
|
||||
// If there is one and it has a path, it's "ns:".
|
||||
|
|
|
|||
|
|
@ -1614,7 +1614,6 @@ func (c *Container) makeBindMounts() error {
|
|||
return errors.Wrapf(err, "error setting timezone for container %s", c.ID())
|
||||
}
|
||||
c.state.BindMounts["/etc/localtime"] = localtimePath
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -86,14 +86,12 @@ func (c *Container) resolvePath(mountPoint string, containerPath string) (string
|
|||
return "", "", err
|
||||
}
|
||||
return mount.Source, absolutePathOnTheBindMount, nil
|
||||
|
||||
}
|
||||
|
||||
if searchPath == "/" {
|
||||
// Cannot go beyond "/", so we're done.
|
||||
break
|
||||
}
|
||||
|
||||
// Walk *down* the path (e.g., "/foo/bar/x" -> "/foo/bar").
|
||||
searchPath = filepath.Dir(searchPath)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,7 +97,6 @@ func newEventFromJSONString(event string) (*Event, error) {
|
|||
return nil, err
|
||||
}
|
||||
return &e, nil
|
||||
|
||||
}
|
||||
|
||||
// ToString converts a Type to a string
|
||||
|
|
|
|||
|
|
@ -86,7 +86,6 @@ func generateEventSinceOption(timeSince time.Time) func(e *Event) bool {
|
|||
func generateEventUntilOption(timeUntil time.Time) func(e *Event) bool {
|
||||
return func(e *Event) bool {
|
||||
return e.Time.Before(timeUntil)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ func (e EventLogFile) Write(ee Event) error {
|
|||
return err
|
||||
}
|
||||
return nil
|
||||
|
||||
}
|
||||
|
||||
// Reads from the log file
|
||||
|
|
|
|||
|
|
@ -1688,7 +1688,6 @@ func (i *Image) GetConfigBlob(ctx context.Context) (*manifest.Schema2Image, erro
|
|||
return nil, errors.Wrapf(err, "unable to parse image blob for %s", i.ID())
|
||||
}
|
||||
return &blob, nil
|
||||
|
||||
}
|
||||
|
||||
// GetHealthCheck returns a HealthConfig for an image. This function only works with
|
||||
|
|
|
|||
|
|
@ -66,7 +66,6 @@ func makeLocalMatrix(b, bg *Image) []localImageTest {
|
|||
|
||||
l = append(l, busybox, busyboxGlibc)
|
||||
return l
|
||||
|
||||
}
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
|
|
|
|||
|
|
@ -52,7 +52,6 @@ func generatePruneFilterFuncs(filter, filterValue string) (ImageFilter, error) {
|
|||
}
|
||||
return false
|
||||
}, nil
|
||||
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
|
@ -170,7 +169,6 @@ func (ir *Runtime) PruneImages(ctx context.Context, all bool, filter []string) (
|
|||
Size: uint64(imgSize),
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
return preports, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ func findImageInRepotags(search imageParts, images []*Image) (*storage.Image, er
|
|||
}
|
||||
}
|
||||
if len(candidates) == 0 {
|
||||
|
||||
return nil, errors.Wrapf(define.ErrNoSuchImage, "unable to find a name and tag match for %s in repotags", searchName)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,6 @@ func validateBridgeOptions(options entities.NetworkCreateOptions) error {
|
|||
}
|
||||
|
||||
return nil
|
||||
|
||||
}
|
||||
|
||||
// parseMTU parses the mtu option
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import (
|
|||
)
|
||||
|
||||
func Test_validateBridgeOptions(t *testing.T) {
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
subnet net.IPNet
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import (
|
|||
)
|
||||
|
||||
func TestNewIPAMDefaultRoute(t *testing.T) {
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
isIPv6 bool
|
||||
|
|
|
|||
|
|
@ -1228,7 +1228,6 @@ func prepareProcessExec(c *Container, options *ExecOptions, env []string, sessio
|
|||
|
||||
if options.Cwd != "" {
|
||||
pspec.Cwd = options.Cwd
|
||||
|
||||
}
|
||||
|
||||
var addGroups []string
|
||||
|
|
@ -1798,5 +1797,4 @@ func httpAttachNonTerminalCopy(container *net.UnixConn, http *bufio.ReadWriter,
|
|||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,7 +103,6 @@ func bindPorts(ports []ocicni.PortMapping) ([]*os.File, error) {
|
|||
}
|
||||
default:
|
||||
return nil, fmt.Errorf("unknown protocol %s", i.Protocol)
|
||||
|
||||
}
|
||||
}
|
||||
return files, nil
|
||||
|
|
|
|||
|
|
@ -1109,7 +1109,6 @@ func WithLogTag(tag string) CtrCreateOption {
|
|||
|
||||
return nil
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// WithCgroupsMode disables the creation of CGroups for the conmon process.
|
||||
|
|
@ -1131,7 +1130,6 @@ func WithCgroupsMode(mode string) CtrCreateOption {
|
|||
|
||||
return nil
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// WithCgroupParent sets the Cgroup Parent of the new container.
|
||||
|
|
@ -1430,7 +1428,6 @@ func WithOverlayVolumes(volumes []*ContainerOverlayVolume) CtrCreateOption {
|
|||
}
|
||||
|
||||
for _, vol := range volumes {
|
||||
|
||||
ctr.config.OverlayVolumes = append(ctr.config.OverlayVolumes, &ContainerOverlayVolume{
|
||||
Dest: vol.Dest,
|
||||
Source: vol.Source,
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ import (
|
|||
|
||||
// Reset removes all storage
|
||||
func (r *Runtime) Reset(ctx context.Context) error {
|
||||
|
||||
pods, err := r.GetAllPods()
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
|||
|
|
@ -146,7 +146,6 @@ func NewRuntime(ctx context.Context, options ...RuntimeOption) (*Runtime, error)
|
|||
// An error will be returned if the configuration file at the given path does
|
||||
// not exist or cannot be loaded
|
||||
func NewRuntimeFromConfig(ctx context.Context, userConfig *config.Config, options ...RuntimeOption) (*Runtime, error) {
|
||||
|
||||
return newRuntimeFromConfig(ctx, userConfig, options...)
|
||||
}
|
||||
|
||||
|
|
@ -382,7 +381,6 @@ func makeRuntime(ctx context.Context, runtime *Runtime) (retErr error) {
|
|||
|
||||
// Initialize remaining OCI runtimes
|
||||
for name, paths := range runtime.config.Engine.OCIRuntimes {
|
||||
|
||||
ociRuntime, err := newConmonOCIRuntime(name, paths, runtime.conmonPath, runtime.runtimeFlags, runtime.config)
|
||||
if err != nil {
|
||||
// Don't fatally error.
|
||||
|
|
@ -437,7 +435,6 @@ func makeRuntime(ctx context.Context, runtime *Runtime) (retErr error) {
|
|||
|
||||
// Set up the CNI net plugin
|
||||
if !rootless.IsRootless() {
|
||||
|
||||
netPlugin, err := ocicni.InitCNI(runtime.config.Network.DefaultNetwork, runtime.config.Network.NetworkConfigDir, runtime.config.Network.CNIPluginDirs...)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "error configuring CNI network plugin")
|
||||
|
|
@ -484,7 +481,6 @@ func makeRuntime(ctx context.Context, runtime *Runtime) (retErr error) {
|
|||
if became {
|
||||
os.Exit(ret)
|
||||
}
|
||||
|
||||
}
|
||||
// If the file doesn't exist, we need to refresh the state
|
||||
// This will trigger on first use as well, but refreshing an
|
||||
|
|
@ -787,7 +783,6 @@ type DBConfig struct {
|
|||
|
||||
// mergeDBConfig merges the configuration from the database.
|
||||
func (r *Runtime) mergeDBConfig(dbConfig *DBConfig) {
|
||||
|
||||
c := &r.config.Engine
|
||||
if !r.storageSet.RunRootSet && dbConfig.StorageTmp != "" {
|
||||
if r.storageConfig.RunRoot != dbConfig.StorageTmp &&
|
||||
|
|
|
|||
|
|
@ -1139,7 +1139,6 @@ func (r *Runtime) IsStorageContainerMounted(id string) (bool, string, error) {
|
|||
// StorageContainers returns a list of containers from containers/storage that
|
||||
// are not currently known to Podman.
|
||||
func (r *Runtime) StorageContainers() ([]storage.Container, error) {
|
||||
|
||||
if r.store == nil {
|
||||
return nil, define.ErrStoreNotInitialized
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ func createTmpFile(content []byte) (string, error) {
|
|||
|
||||
if _, err := tmpfile.Write(content); err != nil {
|
||||
return "", err
|
||||
|
||||
}
|
||||
if err := tmpfile.Close(); err != nil {
|
||||
return "", err
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ const (
|
|||
)
|
||||
|
||||
func (r *Runtime) makeInfraContainer(ctx context.Context, p *Pod, imgName, rawImageName, imgID string, config *v1.ImageConfig) (*Container, error) {
|
||||
|
||||
// Set up generator for infra container defaults
|
||||
g, err := generate.New("linux")
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -111,7 +111,6 @@ func GetEvents(w http.ResponseWriter, r *http.Request) {
|
|||
Until: query.Until,
|
||||
}
|
||||
errorChannel <- runtime.Events(r.Context(), readOpts)
|
||||
|
||||
}()
|
||||
|
||||
var flush = func() {}
|
||||
|
|
|
|||
|
|
@ -202,7 +202,6 @@ func CreateImageFromSrc(w http.ResponseWriter, r *http.Request) {
|
|||
ProgressDetail: map[string]string{},
|
||||
Id: iid,
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
func CreateImageFromImage(w http.ResponseWriter, r *http.Request) {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ func HistoryImage(w http.ResponseWriter, r *http.Request) {
|
|||
if err != nil {
|
||||
utils.Error(w, "Something went wrong.", http.StatusNotFound, errors.Wrapf(err, "failed to find image %s", name))
|
||||
return
|
||||
|
||||
}
|
||||
history, err := newImage.History(r.Context())
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -54,5 +54,4 @@ func RemoveImage(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
utils.WriteResponse(w, http.StatusOK, response)
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@ func InspectSecret(w http.ResponseWriter, r *http.Request) {
|
|||
return
|
||||
}
|
||||
utils.WriteResponse(w, http.StatusOK, reports[0])
|
||||
|
||||
}
|
||||
|
||||
func RemoveSecret(w http.ResponseWriter, r *http.Request) {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@ func ContainerExists(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
utils.InternalServerError(w, err)
|
||||
return
|
||||
|
||||
}
|
||||
if report.Value {
|
||||
utils.WriteResponse(w, http.StatusNoContent, "")
|
||||
|
|
@ -162,7 +161,6 @@ func UnmountContainer(w http.ResponseWriter, r *http.Request) {
|
|||
utils.InternalServerError(w, err)
|
||||
}
|
||||
utils.WriteResponse(w, http.StatusNoContent, "")
|
||||
|
||||
}
|
||||
func MountContainer(w http.ResponseWriter, r *http.Request) {
|
||||
runtime := r.Context().Value("runtime").(*libpod.Runtime)
|
||||
|
|
@ -361,7 +359,6 @@ func ShouldRestart(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
utils.InternalServerError(w, err)
|
||||
return
|
||||
|
||||
}
|
||||
if report.Value {
|
||||
utils.WriteResponse(w, http.StatusNoContent, "")
|
||||
|
|
|
|||
|
|
@ -266,7 +266,6 @@ func ExportImages(w http.ResponseWriter, r *http.Request) {
|
|||
if len(query.References) > 1 && query.Format != define.V2s2Archive {
|
||||
utils.Error(w, "unsupported format", http.StatusInternalServerError, errors.Errorf("multi-image archives must use format of %s", define.V2s2Archive))
|
||||
return
|
||||
|
||||
}
|
||||
|
||||
switch query.Format {
|
||||
|
|
@ -445,7 +444,6 @@ func PushImage(w http.ResponseWriter, r *http.Request) {
|
|||
if authconf != nil {
|
||||
username = authconf.Username
|
||||
password = authconf.Password
|
||||
|
||||
}
|
||||
options := entities.ImagePushOptions{
|
||||
Authfile: authfile,
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ func CreateNetwork(w http.ResponseWriter, r *http.Request) {
|
|||
return
|
||||
}
|
||||
utils.WriteResponse(w, http.StatusOK, report)
|
||||
|
||||
}
|
||||
func ListNetworks(w http.ResponseWriter, r *http.Request) {
|
||||
runtime := r.Context().Value("runtime").(*libpod.Runtime)
|
||||
|
|
|
|||
|
|
@ -140,7 +140,6 @@ func WaitContainerLibpod(w http.ResponseWriter, r *http.Request) {
|
|||
type containerWaitFn func(conditions ...define.ContainerStatus) (int32, error)
|
||||
|
||||
func createContainerWaitFn(ctx context.Context, containerName string, interval time.Duration) containerWaitFn {
|
||||
|
||||
runtime := ctx.Value("runtime").(*libpod.Runtime)
|
||||
var containerEngine entities.ContainerEngine = &abi.ContainerEngine{Libpod: runtime}
|
||||
|
||||
|
|
@ -169,7 +168,6 @@ func isValidDockerCondition(cond string) bool {
|
|||
}
|
||||
|
||||
func waitDockerCondition(ctx context.Context, containerName string, interval time.Duration, dockerCondition string) (int32, error) {
|
||||
|
||||
containerWait := createContainerWaitFn(ctx, containerName, interval)
|
||||
|
||||
var err error
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import (
|
|||
)
|
||||
|
||||
func (s *APIServer) registerPingHandlers(r *mux.Router) error {
|
||||
|
||||
r.Handle("/_ping", s.APIHandler(compat.Ping)).Methods(http.MethodGet, http.MethodHead)
|
||||
r.Handle(VersionedPath("/_ping"), s.APIHandler(compat.Ping)).Methods(http.MethodGet, http.MethodHead)
|
||||
// swagger:operation GET /libpod/_ping libpod libpodPingGet
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ func GetCredentials(r *http.Request) (*types.DockerAuthConfig, string, HeaderAut
|
|||
case has(XRegistryAuthHeader):
|
||||
c, f, err := getAuthCredentials(r)
|
||||
return c, f, XRegistryAuthHeader, err
|
||||
|
||||
}
|
||||
return nil, "", "", nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -137,7 +137,6 @@ func Kill(ctx context.Context, nameOrID string, options *KillOptions) error {
|
|||
return err
|
||||
}
|
||||
return response.Process(nil)
|
||||
|
||||
}
|
||||
|
||||
// Pause pauses a given container. The nameOrID can be a container name
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *AttachOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *AttachOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *CheckpointOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *CheckpointOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *CommitOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *CommitOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *CreateOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *CreateOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *DiffOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *DiffOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *ExecInspectOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *ExecInspectOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *ExecStartOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *ExecStartOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,6 @@ func (o *ExecStartAndAttachOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -71,7 +70,6 @@ func (o *ExecStartAndAttachOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *ExistsOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *ExistsOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *ExportOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *ExportOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *HealthCheckOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *HealthCheckOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *InitOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *InitOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *InspectOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *InspectOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *KillOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *KillOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *ListOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *ListOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *LogOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *LogOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *MountOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *MountOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *MountedContainerPathsOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *MountedContainerPathsOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *PauseOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *PauseOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *PruneOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *PruneOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *RemoveOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *RemoveOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *RenameOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *RenameOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *ResizeExecTTYOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *ResizeExecTTYOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *ResizeTTYOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *ResizeTTYOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *RestartOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *RestartOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *RestoreOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *RestoreOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *ShouldRestartOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *ShouldRestartOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *StartOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *StartOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *StatsOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *StatsOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *StopOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *StopOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *TopOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *TopOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *UnmountOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *UnmountOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *UnpauseOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *UnpauseOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,6 @@ func (o *WaitOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -70,7 +69,6 @@ func (o *WaitOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *KubeOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *KubeOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *SystemdOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *SystemdOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,7 +71,6 @@ func (o *{{.StructName}}) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -80,7 +79,6 @@ func (o *{{.StructName}}) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
@ -239,7 +237,6 @@ func main() {
|
|||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return true
|
||||
})
|
||||
|
|
|
|||
|
|
@ -93,7 +93,6 @@ func Pull(ctx context.Context, rawImage string, options *PullOptions) ([]string,
|
|||
default:
|
||||
return images, errors.New("failed to parse pull results stream, unexpected input")
|
||||
}
|
||||
|
||||
}
|
||||
return images, mErr
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *DiffOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *DiffOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *ExistsOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *ExistsOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *ExportOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *ExportOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ func (o *GetOptions) ToParams() (url.Values, error) {
|
|||
iter := f.MapRange()
|
||||
for iter.Next() {
|
||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||
|
||||
}
|
||||
s, err := json.MarshalToString(lowerCaseKeys)
|
||||
if err != nil {
|
||||
|
|
@ -69,7 +68,6 @@ func (o *GetOptions) ToParams() (url.Values, error) {
|
|||
|
||||
params.Set(fieldName, s)
|
||||
}
|
||||
|
||||
}
|
||||
return params, nil
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue