MCPcopy Create free account
hub / github.com/OctopusDeploy/cli / NewCmdGet

Function NewCmdGet

pkg/cmd/config/get/get.go:16–31  ·  view source on GitHub ↗
(f factory.Factory)

Source from the content-addressed store, hash-verified

14)
15
16func NewCmdGet(f factory.Factory) *cobra.Command {
17 cmd := &cobra.Command{
18 Use: "get [key]",
19 Short: "Gets the value of config key for Octopus CLI",
20 Long: "Gets the value of config key for Octopus CLI.",
21 RunE: func(cmd *cobra.Command, args []string) error {
22 key := ""
23 if len(args) > 0 {
24 key = args[0]
25 }
26 return getRun(f.IsPromptEnabled(), f.Ask, key, cmd.OutOrStdout())
27
28 },
29 }
30 return cmd
31}
32
33func getRun(isPromptEnabled bool, ask question.Asker, key string, out io.Writer) error {
34 if key != "" {

Callers

nothing calls this directly

Calls 2

getRunFunction · 0.85
IsPromptEnabledMethod · 0.65

Tested by

no test coverage detected