MCPcopy Index your code
hub / github.com/containerd/containerd / applyPlatformFlags

Function applyPlatformFlags

cmd/containerd/command/service_windows.go:82–107  ·  view source on GitHub ↗

applyPlatformFlags applies platform-specific flags.

(cliContext *cli.Context)

Source from the content-addressed store, hash-verified

80
81// applyPlatformFlags applies platform-specific flags.
82func applyPlatformFlags(cliContext *cli.Context) {
83 serviceNameFlag = cliContext.String("service-name")
84 if serviceNameFlag == "" {
85 serviceNameFlag = defaultServiceName
86 }
87 for _, v := range []struct {
88 name string
89 d *bool
90 }{
91 {
92 name: "register-service",
93 d: &registerServiceFlag,
94 },
95 {
96 name: "unregister-service",
97 d: &unregisterServiceFlag,
98 },
99 {
100 name: "run-service",
101 d: &runServiceFlag,
102 },
103 } {
104 *v.d = cliContext.Bool(v.name)
105 }
106 logFileFlag = cliContext.String("log-file")
107}
108
109type handler struct {
110 fromsvc chan error

Callers 1

applyFlagsFunction · 0.70

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…