MCPcopy Index your code
hub / github.com/ProspectOne/perfops-cli / requireTarget

Function requireTarget

cmd/root.go:115–122  ·  view source on GitHub ↗

requireTarget returns an error if no target is specified.

()

Source from the content-addressed store, hash-verified

113
114// requireTarget returns an error if no target is specified.
115func requireTarget() cobra.PositionalArgs {
116 return func(cmd *cobra.Command, args []string) error {
117 if len(args) != 1 {
118 return errors.New("no target specified")
119 }
120 return nil
121 }
122}
123
124func chkRunError(err error) error {
125 type argNamer interface {

Callers 7

mtr.goFile · 0.85
ping.goFile · 0.85
dnsperf.goFile · 0.85
traceroute.goFile · 0.85
latency.goFile · 0.85
curl.goFile · 0.85
dnsresolve.goFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected