MCPcopy
hub / github.com/nektos/act / parseRun

Function parseRun

pkg/container/docker_cli_test.go:64–75  ·  view source on GitHub ↗
(args []string)

Source from the content-addressed store, hash-verified

62}
63
64func parseRun(args []string) (*container.Config, *container.HostConfig, *networktypes.NetworkingConfig, error) {
65 flags, copts := setupRunFlags()
66 if err := flags.Parse(args); err != nil {
67 return nil, nil, nil, err
68 }
69 // TODO(dnephin): fix tests to accept ContainerConfig; see https://github.com/moby/moby/pull/31621
70 containerCfg, err := parse(flags, copts, runtime.GOOS)
71 if err != nil {
72 return nil, nil, nil, err
73 }
74 return containerCfg.Config, containerCfg.HostConfig, containerCfg.NetworkingConfig, err
75}
76
77func setupRunFlags() (*pflag.FlagSet, *containerOptions) {
78 flags := pflag.NewFlagSet("run", pflag.ContinueOnError)

Callers 15

mustParseFunction · 0.85
TestParseWithMacAddressFunction · 0.85
TestParseWithExposeFunction · 0.85
TestParseDeviceFunction · 0.85
TestParseNetworkConfigFunction · 0.85
TestParseModesFunction · 0.85
TestRunFlagsParseShmSizeFunction · 0.85
TestParseRestartPolicyFunction · 0.85
TestParseHealthFunction · 0.85
TestParseLoggingOptsFunction · 0.85

Calls 2

setupRunFlagsFunction · 0.85
parseFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…