MCPcopy Create free account
hub / github.com/FalconOpsLLC/goexec / argsTarget

Function argsTarget

cmd/args.go:95–115  ·  view source on GitHub ↗
(proto string)

Source from the content-addressed store, hash-verified

93}
94
95func argsTarget(proto string) func(cmd *cobra.Command, args []string) error {
96
97 return func(cmd *cobra.Command, args []string) (err error) {
98
99 if len(args) != 1 {
100 return errors.New("command require exactly one positional argument: [target]")
101 }
102
103 if credential, target, err = adAuthOpts.WithTarget(context.TODO(), proto, args[0]); err != nil {
104 return fmt.Errorf("failed to parse target: %w", err)
105 }
106
107 if credential == nil {
108 return errors.New("no credentials supplied")
109 }
110 if target == nil {
111 return errors.New("no target supplied")
112 }
113 return
114 }
115}
116
117func argsSmbClient() func(cmd *cobra.Command, args []string) error {
118 return args(

Callers 2

argsSmbClientFunction · 0.85
argsRpcClientFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…