mirror of https://github.com/containers/podman.git
Merge pull request #9331 from Luap99/lint
Enable more golangci-lint linters
This commit is contained in:
commit
291f59600b
|
|
@ -20,7 +20,6 @@ linters:
|
||||||
# All these break for one reason or another
|
# All these break for one reason or another
|
||||||
- nolintlint
|
- nolintlint
|
||||||
- gocognit
|
- gocognit
|
||||||
- stylecheck
|
|
||||||
- testpackage
|
- testpackage
|
||||||
- goerr113
|
- goerr113
|
||||||
- exhaustivestruct
|
- exhaustivestruct
|
||||||
|
|
@ -40,7 +39,6 @@ linters:
|
||||||
- staticcheck
|
- staticcheck
|
||||||
- forbidigo
|
- forbidigo
|
||||||
- exhaustive
|
- exhaustive
|
||||||
- whitespace
|
|
||||||
- unparam
|
- unparam
|
||||||
- gofumpt
|
- gofumpt
|
||||||
- gci
|
- gci
|
||||||
|
|
@ -52,7 +50,6 @@ linters:
|
||||||
- gochecknoinits
|
- gochecknoinits
|
||||||
- goconst
|
- goconst
|
||||||
- gocyclo
|
- gocyclo
|
||||||
- golint
|
|
||||||
- lll
|
- lll
|
||||||
- structcheck
|
- structcheck
|
||||||
- typecheck
|
- typecheck
|
||||||
|
|
|
||||||
|
|
@ -804,5 +804,4 @@ func DefineCreateFlags(cmd *cobra.Command, cf *ContainerCLIOpts) {
|
||||||
"Configure cgroup v2 (key=value)",
|
"Configure cgroup v2 (key=value)",
|
||||||
)
|
)
|
||||||
_ = cmd.RegisterFlagCompletionFunc(cgroupConfFlagName, completion.AutocompleteNone)
|
_ = cmd.RegisterFlagCompletionFunc(cgroupConfFlagName, completion.AutocompleteNone)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -269,7 +269,6 @@ func ContainerCreateToContainerCLIOpts(cc handlers.CreateContainerConfig, cgroup
|
||||||
endpointsConfig := cc.NetworkingConfig.EndpointsConfig
|
endpointsConfig := cc.NetworkingConfig.EndpointsConfig
|
||||||
cniNetworks := make([]string, 0, len(endpointsConfig))
|
cniNetworks := make([]string, 0, len(endpointsConfig))
|
||||||
for netName, endpoint := range endpointsConfig {
|
for netName, endpoint := range endpointsConfig {
|
||||||
|
|
||||||
cniNetworks = append(cniNetworks, netName)
|
cniNetworks = append(cniNetworks, netName)
|
||||||
|
|
||||||
if endpoint == nil {
|
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 errors.Errorf("invalid image-volume type %q. Pick one of bind, tmpfs, or ignore", c.ImageVolume)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,6 @@ func init() {
|
||||||
})
|
})
|
||||||
attachFlags(containerAttachCommand)
|
attachFlags(containerAttachCommand)
|
||||||
validate.AddLatestFlag(containerAttachCommand, &attachOpts.Latest)
|
validate.AddLatestFlag(containerAttachCommand, &attachOpts.Latest)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func attach(cmd *cobra.Command, args []string) error {
|
func attach(cmd *cobra.Command, args []string) error {
|
||||||
|
|
|
||||||
|
|
@ -251,12 +251,12 @@ func ps(cmd *cobra.Command, _ []string) error {
|
||||||
// responses will grow to the largest number of processes reported on, but will not thrash the gc
|
// responses will grow to the largest number of processes reported on, but will not thrash the gc
|
||||||
var responses []psReporter
|
var responses []psReporter
|
||||||
for ; ; responses = responses[:0] {
|
for ; ; responses = responses[:0] {
|
||||||
if ctnrs, err := getResponses(); err != nil {
|
ctnrs, err := getResponses()
|
||||||
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
} else {
|
}
|
||||||
for _, r := range ctnrs {
|
for _, r := range ctnrs {
|
||||||
responses = append(responses, psReporter{r})
|
responses = append(responses, psReporter{r})
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tm.Clear()
|
tm.Clear()
|
||||||
|
|
|
||||||
|
|
@ -118,5 +118,4 @@ func restore(_ *cobra.Command, args []string) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return errs.PrintErrors()
|
return errs.PrintErrors()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,6 @@ func waitFlags(cmd *cobra.Command) {
|
||||||
conditionFlagName := "condition"
|
conditionFlagName := "condition"
|
||||||
flags.StringVar(&waitCondition, conditionFlagName, "stopped", "Condition to wait on")
|
flags.StringVar(&waitCondition, conditionFlagName, "stopped", "Condition to wait on")
|
||||||
_ = cmd.RegisterFlagCompletionFunc(conditionFlagName, common.AutocompleteWaitCondition)
|
_ = cmd.RegisterFlagCompletionFunc(conditionFlagName, common.AutocompleteWaitCondition)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,6 @@ func systemd(cmd *cobra.Command, args []string) error {
|
||||||
default:
|
default:
|
||||||
return errors.Errorf("unknown --format argument: %s", format)
|
return errors.Errorf("unknown --format argument: %s", format)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func printDefault(units map[string]string) error {
|
func printDefault(units map[string]string) error {
|
||||||
|
|
|
||||||
|
|
@ -275,7 +275,6 @@ func tokenRepoTag(ref string) (string, string, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return name, tag, nil
|
return name, tag, nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func sortFunc(key string, data []imageReporter) func(i, j int) bool {
|
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>')")
|
flags.StringArrayVar(&filter, filterFlagName, []string{}, "Provide filter values (e.g. 'label=<key>=<value>')")
|
||||||
//TODO: add completion for filters
|
//TODO: add completion for filters
|
||||||
_ = pruneCmd.RegisterFlagCompletionFunc(filterFlagName, completion.AutocompleteNone)
|
_ = pruneCmd.RegisterFlagCompletionFunc(filterFlagName, completion.AutocompleteNone)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func prune(cmd *cobra.Command, args []string) error {
|
func prune(cmd *cobra.Command, args []string) error {
|
||||||
|
|
|
||||||
|
|
@ -110,11 +110,9 @@ func pullFlags(cmd *cobra.Command) {
|
||||||
_ = cmd.RegisterFlagCompletionFunc(authfileFlagName, completion.AutocompleteDefault)
|
_ = cmd.RegisterFlagCompletionFunc(authfileFlagName, completion.AutocompleteDefault)
|
||||||
|
|
||||||
if !registry.IsRemote() {
|
if !registry.IsRemote() {
|
||||||
|
|
||||||
certDirFlagName := "cert-dir"
|
certDirFlagName := "cert-dir"
|
||||||
flags.StringVar(&pullOptions.CertDir, certDirFlagName, "", "`Pathname` of a directory containing TLS certificates and keys")
|
flags.StringVar(&pullOptions.CertDir, certDirFlagName, "", "`Pathname` of a directory containing TLS certificates and keys")
|
||||||
_ = cmd.RegisterFlagCompletionFunc(certDirFlagName, completion.AutocompleteDefault)
|
_ = cmd.RegisterFlagCompletionFunc(certDirFlagName, completion.AutocompleteDefault)
|
||||||
|
|
||||||
}
|
}
|
||||||
_ = flags.MarkHidden("signature-policy")
|
_ = flags.MarkHidden("signature-policy")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -156,12 +156,12 @@ func imageSearch(cmd *cobra.Command, args []string) error {
|
||||||
return errors.Errorf("filters are not applicable to list tags result")
|
return errors.Errorf("filters are not applicable to list tags result")
|
||||||
}
|
}
|
||||||
if report.IsJSON(searchOptions.Format) {
|
if report.IsJSON(searchOptions.Format) {
|
||||||
listTagsEntries := buildListTagsJson(searchReport)
|
listTagsEntries := buildListTagsJSON(searchReport)
|
||||||
return printJson(listTagsEntries)
|
return printArbitraryJSON(listTagsEntries)
|
||||||
}
|
}
|
||||||
row = "{{.Name}}\t{{.Tag}}\n"
|
row = "{{.Name}}\t{{.Tag}}\n"
|
||||||
case report.IsJSON(searchOptions.Format):
|
case report.IsJSON(searchOptions.Format):
|
||||||
return printJson(searchReport)
|
return printArbitraryJSON(searchReport)
|
||||||
case cmd.Flags().Changed("format"):
|
case cmd.Flags().Changed("format"):
|
||||||
renderHeaders = parse.HasTable(searchOptions.Format)
|
renderHeaders = parse.HasTable(searchOptions.Format)
|
||||||
row = report.NormalizeFormat(searchOptions.Format)
|
row = report.NormalizeFormat(searchOptions.Format)
|
||||||
|
|
@ -186,7 +186,7 @@ func imageSearch(cmd *cobra.Command, args []string) error {
|
||||||
return tmpl.Execute(w, searchReport)
|
return tmpl.Execute(w, searchReport)
|
||||||
}
|
}
|
||||||
|
|
||||||
func printJson(v interface{}) error {
|
func printArbitraryJSON(v interface{}) error {
|
||||||
prettyJSON, err := json.MarshalIndent(v, "", " ")
|
prettyJSON, err := json.MarshalIndent(v, "", " ")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
@ -195,7 +195,7 @@ func printJson(v interface{}) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func buildListTagsJson(searchReport []entities.ImageSearchReport) []listEntryTag {
|
func buildListTagsJSON(searchReport []entities.ImageSearchReport) []listEntryTag {
|
||||||
entries := []listEntryTag{}
|
entries := []listEntryTag{}
|
||||||
|
|
||||||
ReportLoop:
|
ReportLoop:
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,6 @@ func init() {
|
||||||
_ = showFlags.MarkHidden("policypath")
|
_ = showFlags.MarkHidden("policypath")
|
||||||
showFlags.StringVar(&showTrustOptions.RegistryPath, "registrypath", "", "")
|
showFlags.StringVar(&showTrustOptions.RegistryPath, "registrypath", "", "")
|
||||||
_ = showFlags.MarkHidden("registrypath")
|
_ = showFlags.MarkHidden("registrypath")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func showTrust(cmd *cobra.Command, args []string) error {
|
func showTrust(cmd *cobra.Command, args []string) error {
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,6 @@ func init() {
|
||||||
Parent: networkCmd,
|
Parent: networkCmd,
|
||||||
})
|
})
|
||||||
networkCreateFlags(networkCreateCommand)
|
networkCreateFlags(networkCreateCommand)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func networkCreate(cmd *cobra.Command, args []string) error {
|
func networkCreate(cmd *cobra.Command, args []string) error {
|
||||||
|
|
|
||||||
|
|
@ -39,5 +39,4 @@ func init() {
|
||||||
func networkInspect(_ *cobra.Command, args []string) error {
|
func networkInspect(_ *cobra.Command, args []string) error {
|
||||||
inspectOpts.Type = inspect.NetworkType
|
inspectOpts.Type = inspect.NetworkType
|
||||||
return inspect.Inspect(args, *inspectOpts)
|
return inspect.Inspect(args, *inspectOpts)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,6 @@ func networkListFlags(flags *pflag.FlagSet) {
|
||||||
filterFlagName := "filter"
|
filterFlagName := "filter"
|
||||||
flags.StringArrayVarP(&filters, filterFlagName, "f", nil, "Provide filter values (e.g. 'name=podman')")
|
flags.StringArrayVarP(&filters, filterFlagName, "f", nil, "Provide filter values (e.g. 'name=podman')")
|
||||||
_ = networklistCommand.RegisterFlagCompletionFunc(filterFlagName, common.AutocompleteNetworkFilters)
|
_ = networklistCommand.RegisterFlagCompletionFunc(filterFlagName, common.AutocompleteNetworkFilters)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,6 @@ func init() {
|
||||||
_ = kubeCmd.RegisterFlagCompletionFunc(authfileFlagName, completion.AutocompleteDefault)
|
_ = kubeCmd.RegisterFlagCompletionFunc(authfileFlagName, completion.AutocompleteDefault)
|
||||||
|
|
||||||
if !registry.IsRemote() {
|
if !registry.IsRemote() {
|
||||||
|
|
||||||
certDirFlagName := "cert-dir"
|
certDirFlagName := "cert-dir"
|
||||||
flags.StringVar(&kubeOptions.CertDir, certDirFlagName, "", "`Pathname` of a directory containing TLS certificates and keys")
|
flags.StringVar(&kubeOptions.CertDir, certDirFlagName, "", "`Pathname` of a directory containing TLS certificates and keys")
|
||||||
_ = kubeCmd.RegisterFlagCompletionFunc(certDirFlagName, completion.AutocompleteDefault)
|
_ = kubeCmd.RegisterFlagCompletionFunc(certDirFlagName, completion.AutocompleteDefault)
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,6 @@ func init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func inspect(cmd *cobra.Command, args []string) error {
|
func inspect(cmd *cobra.Command, args []string) error {
|
||||||
|
|
||||||
if len(args) < 1 && !inspectOptions.Latest {
|
if len(args) < 1 && !inspectOptions.Latest {
|
||||||
return errors.Errorf("you must provide the name or id of a running pod")
|
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 {
|
if (stat.Mode() & os.ModeNamedPipe) == 0 {
|
||||||
return errors.New("if `-` is used, data must be passed into stdin")
|
return errors.New("if `-` is used, data must be passed into stdin")
|
||||||
|
|
||||||
}
|
}
|
||||||
reader = os.Stdin
|
reader = os.Stdin
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,6 @@ func init() {
|
||||||
formatFlagName := "format"
|
formatFlagName := "format"
|
||||||
flags.StringVar(&listFlag.format, formatFlagName, "{{.ID}}\t{{.Name}}\t{{.Driver}}\t{{.CreatedAt}}\t{{.UpdatedAt}}\t\n", "Format volume output using Go template")
|
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)
|
_ = lsCmd.RegisterFlagCompletionFunc(formatFlagName, common.AutocompleteJSONFormat)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func ls(cmd *cobra.Command, args []string) error {
|
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",
|
UpdatedAt: units.HumanDuration(time.Since(response.UpdatedAt)) + " ago",
|
||||||
Driver: response.Spec.Driver.Name,
|
Driver: response.Spec.Driver.Name,
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
return outputTemplate(cmd, listed)
|
return outputTemplate(cmd, listed)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,14 +26,11 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestShellCompletionFunctions(t *testing.T) {
|
func TestShellCompletionFunctions(t *testing.T) {
|
||||||
|
|
||||||
rootCmd := parseCommands()
|
rootCmd := parseCommands()
|
||||||
checkCommand(t, rootCmd)
|
checkCommand(t, rootCmd)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func checkCommand(t *testing.T, cmd *cobra.Command) {
|
func checkCommand(t *testing.T, cmd *cobra.Command) {
|
||||||
|
|
||||||
if cmd.HasSubCommands() {
|
if cmd.HasSubCommands() {
|
||||||
for _, childCmd := range cmd.Commands() {
|
for _, childCmd := range cmd.Commands() {
|
||||||
checkCommand(t, childCmd)
|
checkCommand(t, childCmd)
|
||||||
|
|
@ -46,7 +43,6 @@ func checkCommand(t *testing.T, cmd *cobra.Command) {
|
||||||
|
|
||||||
// loop over all local flags
|
// loop over all local flags
|
||||||
cmd.LocalFlags().VisitAll(func(flag *pflag.Flag) {
|
cmd.LocalFlags().VisitAll(func(flag *pflag.Flag) {
|
||||||
|
|
||||||
// an error means that there is a completion function for this 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) {
|
err := cmd.RegisterFlagCompletionFunc(flag.Name, func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
|
||||||
return nil, cobra.ShellCompDirectiveDefault
|
return nil, cobra.ShellCompDirectiveDefault
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,6 @@ func init() {
|
||||||
formatFlagName := "format"
|
formatFlagName := "format"
|
||||||
flags.StringVar(&dfOptions.Format, formatFlagName, "", "Pretty-print images using a Go template")
|
flags.StringVar(&dfOptions.Format, formatFlagName, "", "Pretty-print images using a Go template")
|
||||||
_ = dfSystemCommand.RegisterFlagCompletionFunc(formatFlagName, completion.AutocompleteNone)
|
_ = dfSystemCommand.RegisterFlagCompletionFunc(formatFlagName, completion.AutocompleteNone)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func df(cmd *cobra.Command, args []string) error {
|
func df(cmd *cobra.Command, args []string) error {
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,6 @@ func init() {
|
||||||
filterFlagName := "filter"
|
filterFlagName := "filter"
|
||||||
flags.StringArrayVar(&filters, filterFlagName, []string{}, "Provide filter values (e.g. 'label=<key>=<value>')")
|
flags.StringArrayVar(&filters, filterFlagName, []string{}, "Provide filter values (e.g. 'label=<key>=<value>')")
|
||||||
_ = pruneCommand.RegisterFlagCompletionFunc(filterFlagName, completion.AutocompleteNone)
|
_ = pruneCommand.RegisterFlagCompletionFunc(filterFlagName, completion.AutocompleteNone)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func prune(cmd *cobra.Command, args []string) error {
|
func prune(cmd *cobra.Command, args []string) error {
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,6 @@ func init() {
|
||||||
Command: renumberCommand,
|
Command: renumberCommand,
|
||||||
Parent: systemCmd,
|
Parent: systemCmd,
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
func renumber(cmd *cobra.Command, args []string) {
|
func renumber(cmd *cobra.Command, args []string) {
|
||||||
// Shutdown all running engines, `renumber` will hijack all methods
|
// Shutdown all running engines, `renumber` will hijack all methods
|
||||||
|
|
|
||||||
|
|
@ -269,9 +269,9 @@ func (s *BoltState) Refresh() error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
for _, execId := range toRemove {
|
for _, execID := range toRemove {
|
||||||
if err := ctrExecBkt.Delete([]byte(execId)); err != nil {
|
if err := ctrExecBkt.Delete([]byte(execID)); err != nil {
|
||||||
return errors.Wrapf(err, "error removing exec session %s from container %s", execId, string(id))
|
return errors.Wrapf(err, "error removing exec session %s from container %s", execID, string(id))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -904,7 +904,6 @@ func (s *BoltState) ContainerInUse(ctr *Container) ([]string, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return depCtrs, nil
|
return depCtrs, nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// AllContainers retrieves all the containers in the database
|
// AllContainers retrieves all the containers in the database
|
||||||
|
|
@ -962,7 +961,6 @@ func (s *BoltState) AllContainers() ([]*Container, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -2580,7 +2578,6 @@ func (s *BoltState) LookupVolume(name string) (*Volume, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return volume, nil
|
return volume, nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// HasVolume returns true if the given volume exists in the state, otherwise it returns false
|
// 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 container.NetworkDisabled()
|
||||||
}
|
}
|
||||||
return networkDisabled(c)
|
return networkDisabled(c)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func networkDisabled(c *Container) (bool, error) {
|
func networkDisabled(c *Container) (bool, error) {
|
||||||
|
|
|
||||||
|
|
@ -78,9 +78,11 @@ type ExecConfig struct {
|
||||||
type ExecSession struct {
|
type ExecSession struct {
|
||||||
// Id is the ID of the exec session.
|
// Id is the ID of the exec session.
|
||||||
// Named somewhat strangely to not conflict with ID().
|
// Named somewhat strangely to not conflict with ID().
|
||||||
|
// nolint:stylecheck,golint
|
||||||
Id string `json:"id"`
|
Id string `json:"id"`
|
||||||
// ContainerId is the ID of the container this exec session belongs to.
|
// ContainerId is the ID of the container this exec session belongs to.
|
||||||
// Named somewhat strangely to not conflict with ContainerID().
|
// Named somewhat strangely to not conflict with ContainerID().
|
||||||
|
// nolint:stylecheck,golint
|
||||||
ContainerId string `json:"containerId"`
|
ContainerId string `json:"containerId"`
|
||||||
|
|
||||||
// State is the state of the exec session.
|
// State is the state of the exec session.
|
||||||
|
|
|
||||||
|
|
@ -796,7 +796,6 @@ func (c *Container) generateInspectContainerHostConfig(ctrSpec *spec.Spec, named
|
||||||
if c.config.UTSNsCtr != "" {
|
if c.config.UTSNsCtr != "" {
|
||||||
utsMode = fmt.Sprintf("container:%s", c.config.UTSNsCtr)
|
utsMode = fmt.Sprintf("container:%s", c.config.UTSNsCtr)
|
||||||
} else if ctrSpec.Linux != nil {
|
} else if ctrSpec.Linux != nil {
|
||||||
|
|
||||||
// Locate the spec's UTS namespace.
|
// Locate the spec's UTS namespace.
|
||||||
// If there is none, it's uts=host.
|
// If there is none, it's uts=host.
|
||||||
// If there is one and it has a path, it's "ns:".
|
// If there is one and it has a path, it's "ns:".
|
||||||
|
|
|
||||||
|
|
@ -266,7 +266,7 @@ func (c *Container) handleRestartPolicy(ctx context.Context) (_ bool, retErr err
|
||||||
c.newContainerEvent(events.Restart)
|
c.newContainerEvent(events.Restart)
|
||||||
|
|
||||||
// Increment restart count
|
// Increment restart count
|
||||||
c.state.RestartCount += 1
|
c.state.RestartCount++
|
||||||
logrus.Debugf("Container %s now on retry %d", c.ID(), c.state.RestartCount)
|
logrus.Debugf("Container %s now on retry %d", c.ID(), c.state.RestartCount)
|
||||||
if err := c.save(); err != nil {
|
if err := c.save(); err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
|
|
|
||||||
|
|
@ -521,14 +521,14 @@ func (c *Container) generateSpec(ctx context.Context) (*spec.Spec, error) {
|
||||||
}}
|
}}
|
||||||
}
|
}
|
||||||
for _, gid := range execUser.Sgids {
|
for _, gid := range execUser.Sgids {
|
||||||
isGidAvailable := false
|
isGIDAvailable := false
|
||||||
for _, m := range gidMappings {
|
for _, m := range gidMappings {
|
||||||
if gid >= m.ContainerID && gid < m.ContainerID+m.Size {
|
if gid >= m.ContainerID && gid < m.ContainerID+m.Size {
|
||||||
isGidAvailable = true
|
isGIDAvailable = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if isGidAvailable {
|
if isGIDAvailable {
|
||||||
g.AddProcessAdditionalGid(uint32(gid))
|
g.AddProcessAdditionalGid(uint32(gid))
|
||||||
} else {
|
} else {
|
||||||
logrus.Warnf("additional gid=%d is not present in the user namespace, skip setting it", gid)
|
logrus.Warnf("additional gid=%d is not present in the user namespace, skip setting it", gid)
|
||||||
|
|
@ -1614,7 +1614,6 @@ func (c *Container) makeBindMounts() error {
|
||||||
return errors.Wrapf(err, "error setting timezone for container %s", c.ID())
|
return errors.Wrapf(err, "error setting timezone for container %s", c.ID())
|
||||||
}
|
}
|
||||||
c.state.BindMounts["/etc/localtime"] = localtimePath
|
c.state.BindMounts["/etc/localtime"] = localtimePath
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ import (
|
||||||
// mountPoint (e.g., via a mount or volume), the resolved root (e.g., container
|
// mountPoint (e.g., via a mount or volume), the resolved root (e.g., container
|
||||||
// mount, bind mount or volume) and the resolved path on the root (absolute to
|
// mount, bind mount or volume) and the resolved path on the root (absolute to
|
||||||
// the host).
|
// the host).
|
||||||
func (container *Container) resolvePath(mountPoint string, containerPath string) (string, string, error) {
|
func (c *Container) resolvePath(mountPoint string, containerPath string) (string, string, error) {
|
||||||
// Let's first make sure we have a path relative to the mount point.
|
// Let's first make sure we have a path relative to the mount point.
|
||||||
pathRelativeToContainerMountPoint := containerPath
|
pathRelativeToContainerMountPoint := containerPath
|
||||||
if !filepath.IsAbs(containerPath) {
|
if !filepath.IsAbs(containerPath) {
|
||||||
|
|
@ -26,7 +26,7 @@ func (container *Container) resolvePath(mountPoint string, containerPath string)
|
||||||
// container's working dir. To be extra careful, let's first
|
// container's working dir. To be extra careful, let's first
|
||||||
// join the working dir with "/", and the add the containerPath
|
// join the working dir with "/", and the add the containerPath
|
||||||
// to it.
|
// to it.
|
||||||
pathRelativeToContainerMountPoint = filepath.Join(filepath.Join("/", container.WorkingDir()), containerPath)
|
pathRelativeToContainerMountPoint = filepath.Join(filepath.Join("/", c.WorkingDir()), containerPath)
|
||||||
}
|
}
|
||||||
resolvedPathOnTheContainerMountPoint := filepath.Join(mountPoint, pathRelativeToContainerMountPoint)
|
resolvedPathOnTheContainerMountPoint := filepath.Join(mountPoint, pathRelativeToContainerMountPoint)
|
||||||
pathRelativeToContainerMountPoint = strings.TrimPrefix(pathRelativeToContainerMountPoint, mountPoint)
|
pathRelativeToContainerMountPoint = strings.TrimPrefix(pathRelativeToContainerMountPoint, mountPoint)
|
||||||
|
|
@ -43,7 +43,7 @@ func (container *Container) resolvePath(mountPoint string, containerPath string)
|
||||||
|
|
||||||
searchPath := pathRelativeToContainerMountPoint
|
searchPath := pathRelativeToContainerMountPoint
|
||||||
for {
|
for {
|
||||||
volume, err := findVolume(container, searchPath)
|
volume, err := findVolume(c, searchPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", "", err
|
return "", "", err
|
||||||
}
|
}
|
||||||
|
|
@ -74,7 +74,7 @@ func (container *Container) resolvePath(mountPoint string, containerPath string)
|
||||||
return mountPoint, absolutePathOnTheVolumeMount, nil
|
return mountPoint, absolutePathOnTheVolumeMount, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if mount := findBindMount(container, searchPath); mount != nil {
|
if mount := findBindMount(c, searchPath); mount != nil {
|
||||||
logrus.Debugf("Container path %q resolved to bind mount %q:%q on path %q", containerPath, mount.Source, mount.Destination, searchPath)
|
logrus.Debugf("Container path %q resolved to bind mount %q:%q on path %q", containerPath, mount.Source, mount.Destination, searchPath)
|
||||||
// We found a matching bind mount for searchPath. We
|
// We found a matching bind mount for searchPath. We
|
||||||
// now need to first find the relative path of our
|
// now need to first find the relative path of our
|
||||||
|
|
@ -86,14 +86,12 @@ func (container *Container) resolvePath(mountPoint string, containerPath string)
|
||||||
return "", "", err
|
return "", "", err
|
||||||
}
|
}
|
||||||
return mount.Source, absolutePathOnTheBindMount, nil
|
return mount.Source, absolutePathOnTheBindMount, nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if searchPath == "/" {
|
if searchPath == "/" {
|
||||||
// Cannot go beyond "/", so we're done.
|
// Cannot go beyond "/", so we're done.
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
// Walk *down* the path (e.g., "/foo/bar/x" -> "/foo/bar").
|
// Walk *down* the path (e.g., "/foo/bar/x" -> "/foo/bar").
|
||||||
searchPath = filepath.Dir(searchPath)
|
searchPath = filepath.Dir(searchPath)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,6 @@ func newEventFromJSONString(event string) (*Event, error) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return &e, nil
|
return &e, nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ToString converts a Type to a string
|
// 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 {
|
func generateEventUntilOption(timeUntil time.Time) func(e *Event) bool {
|
||||||
return func(e *Event) bool {
|
return func(e *Event) bool {
|
||||||
return e.Time.Before(timeUntil)
|
return e.Time.Before(timeUntil)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,6 @@ func (e EventLogFile) Write(ee Event) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reads from the log file
|
// Reads from the log file
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,7 @@ func (c *Container) updateHealthCheckLog(hcl define.HealthCheckLog, inStartPerio
|
||||||
}
|
}
|
||||||
if !inStartPeriod {
|
if !inStartPeriod {
|
||||||
// increment failing streak
|
// increment failing streak
|
||||||
healthCheck.FailingStreak += 1
|
healthCheck.FailingStreak++
|
||||||
// if failing streak > retries, then status to unhealthy
|
// if failing streak > retries, then status to unhealthy
|
||||||
if healthCheck.FailingStreak >= c.HealthCheckConfig().Retries {
|
if healthCheck.FailingStreak >= c.HealthCheckConfig().Retries {
|
||||||
healthCheck.Status = define.HealthCheckUnhealthy
|
healthCheck.Status = define.HealthCheckUnhealthy
|
||||||
|
|
|
||||||
|
|
@ -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 nil, errors.Wrapf(err, "unable to parse image blob for %s", i.ID())
|
||||||
}
|
}
|
||||||
return &blob, nil
|
return &blob, nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetHealthCheck returns a HealthConfig for an image. This function only works with
|
// 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)
|
l = append(l, busybox, busyboxGlibc)
|
||||||
return l
|
return l
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestMain(m *testing.M) {
|
func TestMain(m *testing.M) {
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,6 @@ func generatePruneFilterFuncs(filter, filterValue string) (ImageFilter, error) {
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}, nil
|
}, nil
|
||||||
|
|
||||||
}
|
}
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
@ -170,7 +169,6 @@ func (ir *Runtime) PruneImages(ctx context.Context, all bool, filter []string) (
|
||||||
Size: uint64(imgSize),
|
Size: uint64(imgSize),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return preports, nil
|
return preports, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,6 @@ func findImageInRepotags(search imageParts, images []*Image) (*storage.Image, er
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if len(candidates) == 0 {
|
if len(candidates) == 0 {
|
||||||
|
|
||||||
return nil, errors.Wrapf(define.ErrNoSuchImage, "unable to find a name and tag match for %s in repotags", searchName)
|
return nil, errors.Wrapf(define.ErrNoSuchImage, "unable to find a name and tag match for %s in repotags", searchName)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -75,9 +74,8 @@ func findImageInRepotags(search imageParts, images []*Image) (*storage.Image, er
|
||||||
}
|
}
|
||||||
if rwImageCnt > 1 {
|
if rwImageCnt > 1 {
|
||||||
return nil, errors.Wrapf(define.ErrMultipleImages, "found multiple read/write images %s", strings.Join(keys, ","))
|
return nil, errors.Wrapf(define.ErrMultipleImages, "found multiple read/write images %s", strings.Join(keys, ","))
|
||||||
} else {
|
|
||||||
return nil, errors.Wrapf(define.ErrMultipleImages, "found multiple read/only images %s", strings.Join(keys, ","))
|
|
||||||
}
|
}
|
||||||
|
return nil, errors.Wrapf(define.ErrMultipleImages, "found multiple read/only images %s", strings.Join(keys, ","))
|
||||||
}
|
}
|
||||||
return candidates[0].image.image, nil
|
return candidates[0].image.image, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -222,11 +222,11 @@ func (r *Runtime) getContainerStoreInfo() (define.ContainerStore, error) {
|
||||||
}
|
}
|
||||||
switch state {
|
switch state {
|
||||||
case define.ContainerStateRunning:
|
case define.ContainerStateRunning:
|
||||||
running += 1
|
running++
|
||||||
case define.ContainerStatePaused:
|
case define.ContainerStatePaused:
|
||||||
paused += 1
|
paused++
|
||||||
default:
|
default:
|
||||||
stopped += 1
|
stopped++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cs.Paused = paused
|
cs.Paused = paused
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,6 @@ func validateBridgeOptions(options entities.NetworkCreateOptions) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// parseMTU parses the mtu option
|
// parseMTU parses the mtu option
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_validateBridgeOptions(t *testing.T) {
|
func Test_validateBridgeOptions(t *testing.T) {
|
||||||
|
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
name string
|
name string
|
||||||
subnet net.IPNet
|
subnet net.IPNet
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestNewIPAMDefaultRoute(t *testing.T) {
|
func TestNewIPAMDefaultRoute(t *testing.T) {
|
||||||
|
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
name string
|
name string
|
||||||
isIPv6 bool
|
isIPv6 bool
|
||||||
|
|
|
||||||
|
|
@ -480,9 +480,8 @@ func (r *Runtime) setupSlirp4netns(ctr *Container) error {
|
||||||
if havePortMapping {
|
if havePortMapping {
|
||||||
if isSlirpHostForward {
|
if isSlirpHostForward {
|
||||||
return r.setupRootlessPortMappingViaSlirp(ctr, cmd, apiSocket)
|
return r.setupRootlessPortMappingViaSlirp(ctr, cmd, apiSocket)
|
||||||
} else {
|
|
||||||
return r.setupRootlessPortMappingViaRLK(ctr, netnsPath)
|
|
||||||
}
|
}
|
||||||
|
return r.setupRootlessPortMappingViaRLK(ctr, netnsPath)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1228,7 +1228,6 @@ func prepareProcessExec(c *Container, options *ExecOptions, env []string, sessio
|
||||||
|
|
||||||
if options.Cwd != "" {
|
if options.Cwd != "" {
|
||||||
pspec.Cwd = options.Cwd
|
pspec.Cwd = options.Cwd
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var addGroups []string
|
var addGroups []string
|
||||||
|
|
@ -1798,5 +1797,4 @@ func httpAttachNonTerminalCopy(container *net.UnixConn, http *bufio.ReadWriter,
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,6 @@ func bindPorts(ports []ocicni.PortMapping) ([]*os.File, error) {
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("unknown protocol %s", i.Protocol)
|
return nil, fmt.Errorf("unknown protocol %s", i.Protocol)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return files, nil
|
return files, nil
|
||||||
|
|
|
||||||
|
|
@ -1109,7 +1109,6 @@ func WithLogTag(tag string) CtrCreateOption {
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// WithCgroupsMode disables the creation of CGroups for the conmon process.
|
// WithCgroupsMode disables the creation of CGroups for the conmon process.
|
||||||
|
|
@ -1131,7 +1130,6 @@ func WithCgroupsMode(mode string) CtrCreateOption {
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// WithCgroupParent sets the Cgroup Parent of the new container.
|
// WithCgroupParent sets the Cgroup Parent of the new container.
|
||||||
|
|
@ -1430,7 +1428,6 @@ func WithOverlayVolumes(volumes []*ContainerOverlayVolume) CtrCreateOption {
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, vol := range volumes {
|
for _, vol := range volumes {
|
||||||
|
|
||||||
ctr.config.OverlayVolumes = append(ctr.config.OverlayVolumes, &ContainerOverlayVolume{
|
ctr.config.OverlayVolumes = append(ctr.config.OverlayVolumes, &ContainerOverlayVolume{
|
||||||
Dest: vol.Dest,
|
Dest: vol.Dest,
|
||||||
Source: vol.Source,
|
Source: vol.Source,
|
||||||
|
|
|
||||||
|
|
@ -241,9 +241,8 @@ func (p *VolumePlugin) makeErrorResponse(err, endpoint, volName string) error {
|
||||||
}
|
}
|
||||||
if volName != "" {
|
if volName != "" {
|
||||||
return errors.Wrapf(errors.New(err), "error on %s on volume %s in volume plugin %s", endpoint, volName, p.Name)
|
return errors.Wrapf(errors.New(err), "error on %s on volume %s in volume plugin %s", endpoint, volName, p.Name)
|
||||||
} else {
|
|
||||||
return errors.Wrapf(errors.New(err), "error on %s in volume plugin %s", endpoint, p.Name)
|
|
||||||
}
|
}
|
||||||
|
return errors.Wrapf(errors.New(err), "error on %s in volume plugin %s", endpoint, p.Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle error responses from plugin
|
// Handle error responses from plugin
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ import (
|
||||||
|
|
||||||
// Reset removes all storage
|
// Reset removes all storage
|
||||||
func (r *Runtime) Reset(ctx context.Context) error {
|
func (r *Runtime) Reset(ctx context.Context) error {
|
||||||
|
|
||||||
pods, err := r.GetAllPods()
|
pods, err := r.GetAllPods()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
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
|
// An error will be returned if the configuration file at the given path does
|
||||||
// not exist or cannot be loaded
|
// not exist or cannot be loaded
|
||||||
func NewRuntimeFromConfig(ctx context.Context, userConfig *config.Config, options ...RuntimeOption) (*Runtime, error) {
|
func NewRuntimeFromConfig(ctx context.Context, userConfig *config.Config, options ...RuntimeOption) (*Runtime, error) {
|
||||||
|
|
||||||
return newRuntimeFromConfig(ctx, userConfig, options...)
|
return newRuntimeFromConfig(ctx, userConfig, options...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -382,7 +381,6 @@ func makeRuntime(ctx context.Context, runtime *Runtime) (retErr error) {
|
||||||
|
|
||||||
// Initialize remaining OCI runtimes
|
// Initialize remaining OCI runtimes
|
||||||
for name, paths := range runtime.config.Engine.OCIRuntimes {
|
for name, paths := range runtime.config.Engine.OCIRuntimes {
|
||||||
|
|
||||||
ociRuntime, err := newConmonOCIRuntime(name, paths, runtime.conmonPath, runtime.runtimeFlags, runtime.config)
|
ociRuntime, err := newConmonOCIRuntime(name, paths, runtime.conmonPath, runtime.runtimeFlags, runtime.config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// Don't fatally error.
|
// Don't fatally error.
|
||||||
|
|
@ -437,7 +435,6 @@ func makeRuntime(ctx context.Context, runtime *Runtime) (retErr error) {
|
||||||
|
|
||||||
// Set up the CNI net plugin
|
// Set up the CNI net plugin
|
||||||
if !rootless.IsRootless() {
|
if !rootless.IsRootless() {
|
||||||
|
|
||||||
netPlugin, err := ocicni.InitCNI(runtime.config.Network.DefaultNetwork, runtime.config.Network.NetworkConfigDir, runtime.config.Network.CNIPluginDirs...)
|
netPlugin, err := ocicni.InitCNI(runtime.config.Network.DefaultNetwork, runtime.config.Network.NetworkConfigDir, runtime.config.Network.CNIPluginDirs...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrapf(err, "error configuring CNI network plugin")
|
return errors.Wrapf(err, "error configuring CNI network plugin")
|
||||||
|
|
@ -484,7 +481,6 @@ func makeRuntime(ctx context.Context, runtime *Runtime) (retErr error) {
|
||||||
if became {
|
if became {
|
||||||
os.Exit(ret)
|
os.Exit(ret)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// If the file doesn't exist, we need to refresh the state
|
// If the file doesn't exist, we need to refresh the state
|
||||||
// This will trigger on first use as well, but refreshing an
|
// 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.
|
// mergeDBConfig merges the configuration from the database.
|
||||||
func (r *Runtime) mergeDBConfig(dbConfig *DBConfig) {
|
func (r *Runtime) mergeDBConfig(dbConfig *DBConfig) {
|
||||||
|
|
||||||
c := &r.config.Engine
|
c := &r.config.Engine
|
||||||
if !r.storageSet.RunRootSet && dbConfig.StorageTmp != "" {
|
if !r.storageSet.RunRootSet && dbConfig.StorageTmp != "" {
|
||||||
if r.storageConfig.RunRoot != 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
|
// StorageContainers returns a list of containers from containers/storage that
|
||||||
// are not currently known to Podman.
|
// are not currently known to Podman.
|
||||||
func (r *Runtime) StorageContainers() ([]storage.Container, error) {
|
func (r *Runtime) StorageContainers() ([]storage.Container, error) {
|
||||||
|
|
||||||
if r.store == nil {
|
if r.store == nil {
|
||||||
return nil, define.ErrStoreNotInitialized
|
return nil, define.ErrStoreNotInitialized
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -313,9 +313,8 @@ func (r *Runtime) LoadImageFromSingleImageArchive(ctx context.Context, writer io
|
||||||
if err == nil && src != nil {
|
if err == nil && src != nil {
|
||||||
if newImages, err := r.ImageRuntime().LoadFromArchiveReference(ctx, src, signaturePolicy, writer); err == nil {
|
if newImages, err := r.ImageRuntime().LoadFromArchiveReference(ctx, src, signaturePolicy, writer); err == nil {
|
||||||
return getImageNames(newImages), nil
|
return getImageNames(newImages), nil
|
||||||
} else {
|
|
||||||
saveErr = err
|
|
||||||
}
|
}
|
||||||
|
saveErr = err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return "", errors.Wrapf(saveErr, "error pulling image")
|
return "", errors.Wrapf(saveErr, "error pulling image")
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@ func createTmpFile(content []byte) (string, error) {
|
||||||
|
|
||||||
if _, err := tmpfile.Write(content); err != nil {
|
if _, err := tmpfile.Write(content); err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
|
|
||||||
}
|
}
|
||||||
if err := tmpfile.Close(); err != nil {
|
if err := tmpfile.Close(); err != nil {
|
||||||
return "", err
|
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) {
|
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
|
// Set up generator for infra container defaults
|
||||||
g, err := generate.New("linux")
|
g, err := generate.New("linux")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ func (v *Volume) mount() error {
|
||||||
// If the count is non-zero, the volume is already mounted.
|
// If the count is non-zero, the volume is already mounted.
|
||||||
// Nothing to do.
|
// Nothing to do.
|
||||||
if v.state.MountCount > 0 {
|
if v.state.MountCount > 0 {
|
||||||
v.state.MountCount += 1
|
v.state.MountCount++
|
||||||
logrus.Debugf("Volume %s mount count now at %d", v.Name(), v.state.MountCount)
|
logrus.Debugf("Volume %s mount count now at %d", v.Name(), v.state.MountCount)
|
||||||
return v.save()
|
return v.save()
|
||||||
}
|
}
|
||||||
|
|
@ -67,7 +67,7 @@ func (v *Volume) mount() error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
v.state.MountCount += 1
|
v.state.MountCount++
|
||||||
v.state.MountPoint = mountPoint
|
v.state.MountPoint = mountPoint
|
||||||
return v.save()
|
return v.save()
|
||||||
}
|
}
|
||||||
|
|
@ -109,7 +109,7 @@ func (v *Volume) mount() error {
|
||||||
logrus.Debugf("Mounted volume %s", v.Name())
|
logrus.Debugf("Mounted volume %s", v.Name())
|
||||||
|
|
||||||
// Increment the mount counter
|
// Increment the mount counter
|
||||||
v.state.MountCount += 1
|
v.state.MountCount++
|
||||||
logrus.Debugf("Volume %s mount count now at %d", v.Name(), v.state.MountCount)
|
logrus.Debugf("Volume %s mount count now at %d", v.Name(), v.state.MountCount)
|
||||||
return v.save()
|
return v.save()
|
||||||
}
|
}
|
||||||
|
|
@ -152,7 +152,7 @@ func (v *Volume) unmount(force bool) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
if !force {
|
if !force {
|
||||||
v.state.MountCount -= 1
|
v.state.MountCount--
|
||||||
} else {
|
} else {
|
||||||
v.state.MountCount = 0
|
v.state.MountCount = 0
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ func handleHeadAndGet(w http.ResponseWriter, r *http.Request, decoder *schema.De
|
||||||
w.Header().Add(copy.XDockerContainerPathStatHeader, statHeader)
|
w.Header().Add(copy.XDockerContainerPathStatHeader, statHeader)
|
||||||
}
|
}
|
||||||
|
|
||||||
if errors.Cause(err) == define.ErrNoSuchCtr || errors.Cause(err) == copy.ENOENT {
|
if errors.Cause(err) == define.ErrNoSuchCtr || errors.Cause(err) == copy.ErrENOENT {
|
||||||
// 404 is returned for an absent container and path. The
|
// 404 is returned for an absent container and path. The
|
||||||
// clients must deal with it accordingly.
|
// clients must deal with it accordingly.
|
||||||
utils.Error(w, "Not found.", http.StatusNotFound, err)
|
utils.Error(w, "Not found.", http.StatusNotFound, err)
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,6 @@ func GetEvents(w http.ResponseWriter, r *http.Request) {
|
||||||
Until: query.Until,
|
Until: query.Until,
|
||||||
}
|
}
|
||||||
errorChannel <- runtime.Events(r.Context(), readOpts)
|
errorChannel <- runtime.Events(r.Context(), readOpts)
|
||||||
|
|
||||||
}()
|
}()
|
||||||
|
|
||||||
var flush = func() {}
|
var flush = func() {}
|
||||||
|
|
|
||||||
|
|
@ -202,7 +202,6 @@ func CreateImageFromSrc(w http.ResponseWriter, r *http.Request) {
|
||||||
ProgressDetail: map[string]string{},
|
ProgressDetail: map[string]string{},
|
||||||
Id: iid,
|
Id: iid,
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func CreateImageFromImage(w http.ResponseWriter, r *http.Request) {
|
func CreateImageFromImage(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ func HistoryImage(w http.ResponseWriter, r *http.Request) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Error(w, "Something went wrong.", http.StatusNotFound, errors.Wrapf(err, "failed to find image %s", name))
|
utils.Error(w, "Something went wrong.", http.StatusNotFound, errors.Wrapf(err, "failed to find image %s", name))
|
||||||
return
|
return
|
||||||
|
|
||||||
}
|
}
|
||||||
history, err := newImage.History(r.Context())
|
history, err := newImage.History(r.Context())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
|
|
@ -54,5 +54,4 @@ func RemoveImage(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
|
|
||||||
utils.WriteResponse(w, http.StatusOK, response)
|
utils.WriteResponse(w, http.StatusOK, response)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -277,10 +277,10 @@ func CreateNetwork(w http.ResponseWriter, r *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
body := struct {
|
body := struct {
|
||||||
Id string
|
ID string `json:"Id"`
|
||||||
Warning []string
|
Warning []string
|
||||||
}{
|
}{
|
||||||
Id: net.ID,
|
ID: net.ID,
|
||||||
}
|
}
|
||||||
utils.WriteResponse(w, http.StatusCreated, body)
|
utils.WriteResponse(w, http.StatusCreated, body)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,6 @@ func InspectSecret(w http.ResponseWriter, r *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
utils.WriteResponse(w, http.StatusOK, reports[0])
|
utils.WriteResponse(w, http.StatusOK, reports[0])
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func RemoveSecret(w http.ResponseWriter, r *http.Request) {
|
func RemoveSecret(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,6 @@ func ContainerExists(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
utils.InternalServerError(w, err)
|
utils.InternalServerError(w, err)
|
||||||
return
|
return
|
||||||
|
|
||||||
}
|
}
|
||||||
if report.Value {
|
if report.Value {
|
||||||
utils.WriteResponse(w, http.StatusNoContent, "")
|
utils.WriteResponse(w, http.StatusNoContent, "")
|
||||||
|
|
@ -162,7 +161,6 @@ func UnmountContainer(w http.ResponseWriter, r *http.Request) {
|
||||||
utils.InternalServerError(w, err)
|
utils.InternalServerError(w, err)
|
||||||
}
|
}
|
||||||
utils.WriteResponse(w, http.StatusNoContent, "")
|
utils.WriteResponse(w, http.StatusNoContent, "")
|
||||||
|
|
||||||
}
|
}
|
||||||
func MountContainer(w http.ResponseWriter, r *http.Request) {
|
func MountContainer(w http.ResponseWriter, r *http.Request) {
|
||||||
runtime := r.Context().Value("runtime").(*libpod.Runtime)
|
runtime := r.Context().Value("runtime").(*libpod.Runtime)
|
||||||
|
|
@ -361,7 +359,6 @@ func ShouldRestart(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
utils.InternalServerError(w, err)
|
utils.InternalServerError(w, err)
|
||||||
return
|
return
|
||||||
|
|
||||||
}
|
}
|
||||||
if report.Value {
|
if report.Value {
|
||||||
utils.WriteResponse(w, http.StatusNoContent, "")
|
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 {
|
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))
|
utils.Error(w, "unsupported format", http.StatusInternalServerError, errors.Errorf("multi-image archives must use format of %s", define.V2s2Archive))
|
||||||
return
|
return
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch query.Format {
|
switch query.Format {
|
||||||
|
|
@ -445,7 +444,6 @@ func PushImage(w http.ResponseWriter, r *http.Request) {
|
||||||
if authconf != nil {
|
if authconf != nil {
|
||||||
username = authconf.Username
|
username = authconf.Username
|
||||||
password = authconf.Password
|
password = authconf.Password
|
||||||
|
|
||||||
}
|
}
|
||||||
options := entities.ImagePushOptions{
|
options := entities.ImagePushOptions{
|
||||||
Authfile: authfile,
|
Authfile: authfile,
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,6 @@ func CreateNetwork(w http.ResponseWriter, r *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
utils.WriteResponse(w, http.StatusOK, report)
|
utils.WriteResponse(w, http.StatusOK, report)
|
||||||
|
|
||||||
}
|
}
|
||||||
func ListNetworks(w http.ResponseWriter, r *http.Request) {
|
func ListNetworks(w http.ResponseWriter, r *http.Request) {
|
||||||
runtime := r.Context().Value("runtime").(*libpod.Runtime)
|
runtime := r.Context().Value("runtime").(*libpod.Runtime)
|
||||||
|
|
|
||||||
|
|
@ -130,10 +130,9 @@ func WaitContainerLibpod(w http.ResponseWriter, r *http.Request) {
|
||||||
if errors.Cause(err) == define.ErrNoSuchCtr {
|
if errors.Cause(err) == define.ErrNoSuchCtr {
|
||||||
ContainerNotFound(w, name, err)
|
ContainerNotFound(w, name, err)
|
||||||
return
|
return
|
||||||
} else {
|
|
||||||
InternalServerError(w, err)
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
InternalServerError(w, err)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
WriteResponse(w, http.StatusOK, strconv.Itoa(int(exitCode)))
|
WriteResponse(w, http.StatusOK, strconv.Itoa(int(exitCode)))
|
||||||
}
|
}
|
||||||
|
|
@ -141,7 +140,6 @@ func WaitContainerLibpod(w http.ResponseWriter, r *http.Request) {
|
||||||
type containerWaitFn func(conditions ...define.ContainerStatus) (int32, error)
|
type containerWaitFn func(conditions ...define.ContainerStatus) (int32, error)
|
||||||
|
|
||||||
func createContainerWaitFn(ctx context.Context, containerName string, interval time.Duration) containerWaitFn {
|
func createContainerWaitFn(ctx context.Context, containerName string, interval time.Duration) containerWaitFn {
|
||||||
|
|
||||||
runtime := ctx.Value("runtime").(*libpod.Runtime)
|
runtime := ctx.Value("runtime").(*libpod.Runtime)
|
||||||
var containerEngine entities.ContainerEngine = &abi.ContainerEngine{Libpod: runtime}
|
var containerEngine entities.ContainerEngine = &abi.ContainerEngine{Libpod: runtime}
|
||||||
|
|
||||||
|
|
@ -170,7 +168,6 @@ func isValidDockerCondition(cond string) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
func waitDockerCondition(ctx context.Context, containerName string, interval time.Duration, dockerCondition string) (int32, error) {
|
func waitDockerCondition(ctx context.Context, containerName string, interval time.Duration, dockerCondition string) (int32, error) {
|
||||||
|
|
||||||
containerWait := createContainerWaitFn(ctx, containerName, interval)
|
containerWait := createContainerWaitFn(ctx, containerName, interval)
|
||||||
|
|
||||||
var err error
|
var err error
|
||||||
|
|
@ -200,9 +197,8 @@ func waitRemoved(ctrWait containerWaitFn) (int32, error) {
|
||||||
code, err := ctrWait(define.ContainerStateUnknown)
|
code, err := ctrWait(define.ContainerStateUnknown)
|
||||||
if err != nil && errors.Cause(err) == define.ErrNoSuchCtr {
|
if err != nil && errors.Cause(err) == define.ErrNoSuchCtr {
|
||||||
return code, nil
|
return code, nil
|
||||||
} else {
|
|
||||||
return code, err
|
|
||||||
}
|
}
|
||||||
|
return code, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func waitNextExit(ctrWait containerWaitFn) (int32, error) {
|
func waitNextExit(ctrWait containerWaitFn) (int32, error) {
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *APIServer) registerPingHandlers(r *mux.Router) error {
|
func (s *APIServer) registerPingHandlers(r *mux.Router) error {
|
||||||
|
|
||||||
r.Handle("/_ping", s.APIHandler(compat.Ping)).Methods(http.MethodGet, http.MethodHead)
|
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)
|
r.Handle(VersionedPath("/_ping"), s.APIHandler(compat.Ping)).Methods(http.MethodGet, http.MethodHead)
|
||||||
// swagger:operation GET /libpod/_ping libpod libpodPingGet
|
// swagger:operation GET /libpod/_ping libpod libpodPingGet
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,6 @@ func GetCredentials(r *http.Request) (*types.DockerAuthConfig, string, HeaderAut
|
||||||
case has(XRegistryAuthHeader):
|
case has(XRegistryAuthHeader):
|
||||||
c, f, err := getAuthCredentials(r)
|
c, f, err := getAuthCredentials(r)
|
||||||
return c, f, XRegistryAuthHeader, err
|
return c, f, XRegistryAuthHeader, err
|
||||||
|
|
||||||
}
|
}
|
||||||
return nil, "", "", nil
|
return nil, "", "", nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ func Stat(ctx context.Context, nameOrID string, path string) (*entities.Containe
|
||||||
|
|
||||||
var finalErr error
|
var finalErr error
|
||||||
if response.StatusCode == http.StatusNotFound {
|
if response.StatusCode == http.StatusNotFound {
|
||||||
finalErr = copy.ENOENT
|
finalErr = copy.ErrENOENT
|
||||||
} else if response.StatusCode != http.StatusOK {
|
} else if response.StatusCode != http.StatusOK {
|
||||||
finalErr = errors.New(response.Status)
|
finalErr = errors.New(response.Status)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,6 @@ func Kill(ctx context.Context, nameOrID string, options *KillOptions) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return response.Process(nil)
|
return response.Process(nil)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pause pauses a given container. The nameOrID can be a container name
|
// Pause pauses a given container. The nameOrID can be a container name
|
||||||
|
|
@ -270,8 +269,8 @@ func Top(ctx context.Context, nameOrID string, options *TopOptions) ([]string, e
|
||||||
}
|
}
|
||||||
params := url.Values{}
|
params := url.Values{}
|
||||||
if options.Changed("Descriptors") {
|
if options.Changed("Descriptors") {
|
||||||
ps_args := strings.Join(options.GetDescriptors(), ",")
|
psArgs := strings.Join(options.GetDescriptors(), ",")
|
||||||
params.Add("ps_args", ps_args)
|
params.Add("ps_args", psArgs)
|
||||||
}
|
}
|
||||||
response, err := conn.DoRequest(nil, http.MethodGet, "/containers/%s/top", params, nil, nameOrID)
|
response, err := conn.DoRequest(nil, http.MethodGet, "/containers/%s/top", params, nil, nameOrID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ func (o *AttachOptions) ToParams() (url.Values, error) {
|
||||||
iter := f.MapRange()
|
iter := f.MapRange()
|
||||||
for iter.Next() {
|
for iter.Next() {
|
||||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||||
|
|
||||||
}
|
}
|
||||||
s, err := json.MarshalToString(lowerCaseKeys)
|
s, err := json.MarshalToString(lowerCaseKeys)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -69,7 +68,6 @@ func (o *AttachOptions) ToParams() (url.Values, error) {
|
||||||
|
|
||||||
params.Set(fieldName, s)
|
params.Set(fieldName, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return params, nil
|
return params, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ func (o *CheckpointOptions) ToParams() (url.Values, error) {
|
||||||
iter := f.MapRange()
|
iter := f.MapRange()
|
||||||
for iter.Next() {
|
for iter.Next() {
|
||||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||||
|
|
||||||
}
|
}
|
||||||
s, err := json.MarshalToString(lowerCaseKeys)
|
s, err := json.MarshalToString(lowerCaseKeys)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -69,7 +68,6 @@ func (o *CheckpointOptions) ToParams() (url.Values, error) {
|
||||||
|
|
||||||
params.Set(fieldName, s)
|
params.Set(fieldName, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return params, nil
|
return params, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ func (o *CommitOptions) ToParams() (url.Values, error) {
|
||||||
iter := f.MapRange()
|
iter := f.MapRange()
|
||||||
for iter.Next() {
|
for iter.Next() {
|
||||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||||
|
|
||||||
}
|
}
|
||||||
s, err := json.MarshalToString(lowerCaseKeys)
|
s, err := json.MarshalToString(lowerCaseKeys)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -69,7 +68,6 @@ func (o *CommitOptions) ToParams() (url.Values, error) {
|
||||||
|
|
||||||
params.Set(fieldName, s)
|
params.Set(fieldName, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return params, nil
|
return params, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ func (o *CreateOptions) ToParams() (url.Values, error) {
|
||||||
iter := f.MapRange()
|
iter := f.MapRange()
|
||||||
for iter.Next() {
|
for iter.Next() {
|
||||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||||
|
|
||||||
}
|
}
|
||||||
s, err := json.MarshalToString(lowerCaseKeys)
|
s, err := json.MarshalToString(lowerCaseKeys)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -69,7 +68,6 @@ func (o *CreateOptions) ToParams() (url.Values, error) {
|
||||||
|
|
||||||
params.Set(fieldName, s)
|
params.Set(fieldName, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return params, nil
|
return params, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ func (o *DiffOptions) ToParams() (url.Values, error) {
|
||||||
iter := f.MapRange()
|
iter := f.MapRange()
|
||||||
for iter.Next() {
|
for iter.Next() {
|
||||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||||
|
|
||||||
}
|
}
|
||||||
s, err := json.MarshalToString(lowerCaseKeys)
|
s, err := json.MarshalToString(lowerCaseKeys)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -69,7 +68,6 @@ func (o *DiffOptions) ToParams() (url.Values, error) {
|
||||||
|
|
||||||
params.Set(fieldName, s)
|
params.Set(fieldName, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return params, nil
|
return params, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ func (o *ExecInspectOptions) ToParams() (url.Values, error) {
|
||||||
iter := f.MapRange()
|
iter := f.MapRange()
|
||||||
for iter.Next() {
|
for iter.Next() {
|
||||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||||
|
|
||||||
}
|
}
|
||||||
s, err := json.MarshalToString(lowerCaseKeys)
|
s, err := json.MarshalToString(lowerCaseKeys)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -69,7 +68,6 @@ func (o *ExecInspectOptions) ToParams() (url.Values, error) {
|
||||||
|
|
||||||
params.Set(fieldName, s)
|
params.Set(fieldName, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return params, nil
|
return params, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ func (o *ExecStartOptions) ToParams() (url.Values, error) {
|
||||||
iter := f.MapRange()
|
iter := f.MapRange()
|
||||||
for iter.Next() {
|
for iter.Next() {
|
||||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||||
|
|
||||||
}
|
}
|
||||||
s, err := json.MarshalToString(lowerCaseKeys)
|
s, err := json.MarshalToString(lowerCaseKeys)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -69,7 +68,6 @@ func (o *ExecStartOptions) ToParams() (url.Values, error) {
|
||||||
|
|
||||||
params.Set(fieldName, s)
|
params.Set(fieldName, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return params, nil
|
return params, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,6 @@ func (o *ExecStartAndAttachOptions) ToParams() (url.Values, error) {
|
||||||
iter := f.MapRange()
|
iter := f.MapRange()
|
||||||
for iter.Next() {
|
for iter.Next() {
|
||||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||||
|
|
||||||
}
|
}
|
||||||
s, err := json.MarshalToString(lowerCaseKeys)
|
s, err := json.MarshalToString(lowerCaseKeys)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -71,7 +70,6 @@ func (o *ExecStartAndAttachOptions) ToParams() (url.Values, error) {
|
||||||
|
|
||||||
params.Set(fieldName, s)
|
params.Set(fieldName, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return params, nil
|
return params, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ func (o *ExistsOptions) ToParams() (url.Values, error) {
|
||||||
iter := f.MapRange()
|
iter := f.MapRange()
|
||||||
for iter.Next() {
|
for iter.Next() {
|
||||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||||
|
|
||||||
}
|
}
|
||||||
s, err := json.MarshalToString(lowerCaseKeys)
|
s, err := json.MarshalToString(lowerCaseKeys)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -69,7 +68,6 @@ func (o *ExistsOptions) ToParams() (url.Values, error) {
|
||||||
|
|
||||||
params.Set(fieldName, s)
|
params.Set(fieldName, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return params, nil
|
return params, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ func (o *ExportOptions) ToParams() (url.Values, error) {
|
||||||
iter := f.MapRange()
|
iter := f.MapRange()
|
||||||
for iter.Next() {
|
for iter.Next() {
|
||||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||||
|
|
||||||
}
|
}
|
||||||
s, err := json.MarshalToString(lowerCaseKeys)
|
s, err := json.MarshalToString(lowerCaseKeys)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -69,7 +68,6 @@ func (o *ExportOptions) ToParams() (url.Values, error) {
|
||||||
|
|
||||||
params.Set(fieldName, s)
|
params.Set(fieldName, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return params, nil
|
return params, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ func (o *HealthCheckOptions) ToParams() (url.Values, error) {
|
||||||
iter := f.MapRange()
|
iter := f.MapRange()
|
||||||
for iter.Next() {
|
for iter.Next() {
|
||||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||||
|
|
||||||
}
|
}
|
||||||
s, err := json.MarshalToString(lowerCaseKeys)
|
s, err := json.MarshalToString(lowerCaseKeys)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -69,7 +68,6 @@ func (o *HealthCheckOptions) ToParams() (url.Values, error) {
|
||||||
|
|
||||||
params.Set(fieldName, s)
|
params.Set(fieldName, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return params, nil
|
return params, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ func (o *InitOptions) ToParams() (url.Values, error) {
|
||||||
iter := f.MapRange()
|
iter := f.MapRange()
|
||||||
for iter.Next() {
|
for iter.Next() {
|
||||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||||
|
|
||||||
}
|
}
|
||||||
s, err := json.MarshalToString(lowerCaseKeys)
|
s, err := json.MarshalToString(lowerCaseKeys)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -69,7 +68,6 @@ func (o *InitOptions) ToParams() (url.Values, error) {
|
||||||
|
|
||||||
params.Set(fieldName, s)
|
params.Set(fieldName, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return params, nil
|
return params, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ func (o *InspectOptions) ToParams() (url.Values, error) {
|
||||||
iter := f.MapRange()
|
iter := f.MapRange()
|
||||||
for iter.Next() {
|
for iter.Next() {
|
||||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||||
|
|
||||||
}
|
}
|
||||||
s, err := json.MarshalToString(lowerCaseKeys)
|
s, err := json.MarshalToString(lowerCaseKeys)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -69,7 +68,6 @@ func (o *InspectOptions) ToParams() (url.Values, error) {
|
||||||
|
|
||||||
params.Set(fieldName, s)
|
params.Set(fieldName, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return params, nil
|
return params, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ func (o *KillOptions) ToParams() (url.Values, error) {
|
||||||
iter := f.MapRange()
|
iter := f.MapRange()
|
||||||
for iter.Next() {
|
for iter.Next() {
|
||||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||||
|
|
||||||
}
|
}
|
||||||
s, err := json.MarshalToString(lowerCaseKeys)
|
s, err := json.MarshalToString(lowerCaseKeys)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -69,7 +68,6 @@ func (o *KillOptions) ToParams() (url.Values, error) {
|
||||||
|
|
||||||
params.Set(fieldName, s)
|
params.Set(fieldName, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return params, nil
|
return params, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ func (o *ListOptions) ToParams() (url.Values, error) {
|
||||||
iter := f.MapRange()
|
iter := f.MapRange()
|
||||||
for iter.Next() {
|
for iter.Next() {
|
||||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||||
|
|
||||||
}
|
}
|
||||||
s, err := json.MarshalToString(lowerCaseKeys)
|
s, err := json.MarshalToString(lowerCaseKeys)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -69,7 +68,6 @@ func (o *ListOptions) ToParams() (url.Values, error) {
|
||||||
|
|
||||||
params.Set(fieldName, s)
|
params.Set(fieldName, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return params, nil
|
return params, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ func (o *LogOptions) ToParams() (url.Values, error) {
|
||||||
iter := f.MapRange()
|
iter := f.MapRange()
|
||||||
for iter.Next() {
|
for iter.Next() {
|
||||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||||
|
|
||||||
}
|
}
|
||||||
s, err := json.MarshalToString(lowerCaseKeys)
|
s, err := json.MarshalToString(lowerCaseKeys)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -69,7 +68,6 @@ func (o *LogOptions) ToParams() (url.Values, error) {
|
||||||
|
|
||||||
params.Set(fieldName, s)
|
params.Set(fieldName, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return params, nil
|
return params, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ func (o *MountOptions) ToParams() (url.Values, error) {
|
||||||
iter := f.MapRange()
|
iter := f.MapRange()
|
||||||
for iter.Next() {
|
for iter.Next() {
|
||||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||||
|
|
||||||
}
|
}
|
||||||
s, err := json.MarshalToString(lowerCaseKeys)
|
s, err := json.MarshalToString(lowerCaseKeys)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -69,7 +68,6 @@ func (o *MountOptions) ToParams() (url.Values, error) {
|
||||||
|
|
||||||
params.Set(fieldName, s)
|
params.Set(fieldName, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return params, nil
|
return params, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ func (o *MountedContainerPathsOptions) ToParams() (url.Values, error) {
|
||||||
iter := f.MapRange()
|
iter := f.MapRange()
|
||||||
for iter.Next() {
|
for iter.Next() {
|
||||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||||
|
|
||||||
}
|
}
|
||||||
s, err := json.MarshalToString(lowerCaseKeys)
|
s, err := json.MarshalToString(lowerCaseKeys)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -69,7 +68,6 @@ func (o *MountedContainerPathsOptions) ToParams() (url.Values, error) {
|
||||||
|
|
||||||
params.Set(fieldName, s)
|
params.Set(fieldName, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return params, nil
|
return params, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ func (o *PauseOptions) ToParams() (url.Values, error) {
|
||||||
iter := f.MapRange()
|
iter := f.MapRange()
|
||||||
for iter.Next() {
|
for iter.Next() {
|
||||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||||
|
|
||||||
}
|
}
|
||||||
s, err := json.MarshalToString(lowerCaseKeys)
|
s, err := json.MarshalToString(lowerCaseKeys)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -69,7 +68,6 @@ func (o *PauseOptions) ToParams() (url.Values, error) {
|
||||||
|
|
||||||
params.Set(fieldName, s)
|
params.Set(fieldName, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return params, nil
|
return params, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ func (o *PruneOptions) ToParams() (url.Values, error) {
|
||||||
iter := f.MapRange()
|
iter := f.MapRange()
|
||||||
for iter.Next() {
|
for iter.Next() {
|
||||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||||
|
|
||||||
}
|
}
|
||||||
s, err := json.MarshalToString(lowerCaseKeys)
|
s, err := json.MarshalToString(lowerCaseKeys)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -69,7 +68,6 @@ func (o *PruneOptions) ToParams() (url.Values, error) {
|
||||||
|
|
||||||
params.Set(fieldName, s)
|
params.Set(fieldName, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return params, nil
|
return params, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ func (o *RemoveOptions) ToParams() (url.Values, error) {
|
||||||
iter := f.MapRange()
|
iter := f.MapRange()
|
||||||
for iter.Next() {
|
for iter.Next() {
|
||||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||||
|
|
||||||
}
|
}
|
||||||
s, err := json.MarshalToString(lowerCaseKeys)
|
s, err := json.MarshalToString(lowerCaseKeys)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -69,7 +68,6 @@ func (o *RemoveOptions) ToParams() (url.Values, error) {
|
||||||
|
|
||||||
params.Set(fieldName, s)
|
params.Set(fieldName, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return params, nil
|
return params, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ func (o *RenameOptions) ToParams() (url.Values, error) {
|
||||||
iter := f.MapRange()
|
iter := f.MapRange()
|
||||||
for iter.Next() {
|
for iter.Next() {
|
||||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||||
|
|
||||||
}
|
}
|
||||||
s, err := json.MarshalToString(lowerCaseKeys)
|
s, err := json.MarshalToString(lowerCaseKeys)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -69,7 +68,6 @@ func (o *RenameOptions) ToParams() (url.Values, error) {
|
||||||
|
|
||||||
params.Set(fieldName, s)
|
params.Set(fieldName, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return params, nil
|
return params, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ func (o *ResizeExecTTYOptions) ToParams() (url.Values, error) {
|
||||||
iter := f.MapRange()
|
iter := f.MapRange()
|
||||||
for iter.Next() {
|
for iter.Next() {
|
||||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||||
|
|
||||||
}
|
}
|
||||||
s, err := json.MarshalToString(lowerCaseKeys)
|
s, err := json.MarshalToString(lowerCaseKeys)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -69,7 +68,6 @@ func (o *ResizeExecTTYOptions) ToParams() (url.Values, error) {
|
||||||
|
|
||||||
params.Set(fieldName, s)
|
params.Set(fieldName, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return params, nil
|
return params, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ func (o *ResizeTTYOptions) ToParams() (url.Values, error) {
|
||||||
iter := f.MapRange()
|
iter := f.MapRange()
|
||||||
for iter.Next() {
|
for iter.Next() {
|
||||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||||
|
|
||||||
}
|
}
|
||||||
s, err := json.MarshalToString(lowerCaseKeys)
|
s, err := json.MarshalToString(lowerCaseKeys)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -69,7 +68,6 @@ func (o *ResizeTTYOptions) ToParams() (url.Values, error) {
|
||||||
|
|
||||||
params.Set(fieldName, s)
|
params.Set(fieldName, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return params, nil
|
return params, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ func (o *RestartOptions) ToParams() (url.Values, error) {
|
||||||
iter := f.MapRange()
|
iter := f.MapRange()
|
||||||
for iter.Next() {
|
for iter.Next() {
|
||||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||||
|
|
||||||
}
|
}
|
||||||
s, err := json.MarshalToString(lowerCaseKeys)
|
s, err := json.MarshalToString(lowerCaseKeys)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -69,7 +68,6 @@ func (o *RestartOptions) ToParams() (url.Values, error) {
|
||||||
|
|
||||||
params.Set(fieldName, s)
|
params.Set(fieldName, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return params, nil
|
return params, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ func (o *RestoreOptions) ToParams() (url.Values, error) {
|
||||||
iter := f.MapRange()
|
iter := f.MapRange()
|
||||||
for iter.Next() {
|
for iter.Next() {
|
||||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||||
|
|
||||||
}
|
}
|
||||||
s, err := json.MarshalToString(lowerCaseKeys)
|
s, err := json.MarshalToString(lowerCaseKeys)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -69,7 +68,6 @@ func (o *RestoreOptions) ToParams() (url.Values, error) {
|
||||||
|
|
||||||
params.Set(fieldName, s)
|
params.Set(fieldName, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return params, nil
|
return params, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ func (o *ShouldRestartOptions) ToParams() (url.Values, error) {
|
||||||
iter := f.MapRange()
|
iter := f.MapRange()
|
||||||
for iter.Next() {
|
for iter.Next() {
|
||||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||||
|
|
||||||
}
|
}
|
||||||
s, err := json.MarshalToString(lowerCaseKeys)
|
s, err := json.MarshalToString(lowerCaseKeys)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -69,7 +68,6 @@ func (o *ShouldRestartOptions) ToParams() (url.Values, error) {
|
||||||
|
|
||||||
params.Set(fieldName, s)
|
params.Set(fieldName, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return params, nil
|
return params, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ func (o *StartOptions) ToParams() (url.Values, error) {
|
||||||
iter := f.MapRange()
|
iter := f.MapRange()
|
||||||
for iter.Next() {
|
for iter.Next() {
|
||||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||||
|
|
||||||
}
|
}
|
||||||
s, err := json.MarshalToString(lowerCaseKeys)
|
s, err := json.MarshalToString(lowerCaseKeys)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -69,7 +68,6 @@ func (o *StartOptions) ToParams() (url.Values, error) {
|
||||||
|
|
||||||
params.Set(fieldName, s)
|
params.Set(fieldName, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return params, nil
|
return params, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@ func (o *StatsOptions) ToParams() (url.Values, error) {
|
||||||
iter := f.MapRange()
|
iter := f.MapRange()
|
||||||
for iter.Next() {
|
for iter.Next() {
|
||||||
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
lowerCaseKeys[iter.Key().Interface().(string)] = iter.Value().Interface().([]string)
|
||||||
|
|
||||||
}
|
}
|
||||||
s, err := json.MarshalToString(lowerCaseKeys)
|
s, err := json.MarshalToString(lowerCaseKeys)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -69,7 +68,6 @@ func (o *StatsOptions) ToParams() (url.Values, error) {
|
||||||
|
|
||||||
params.Set(fieldName, s)
|
params.Set(fieldName, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return params, nil
|
return params, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue