MCPcopy Create free account
hub / github.com/go-task/task / Get

Function Get

args/args.go:16–24  ·  view source on GitHub ↗

Get fetches the remaining arguments after CLI parsing and splits them into two groups: the arguments before the double dash (--) and the arguments after the double dash.

()

Source from the content-addressed store, hash-verified

14// two groups: the arguments before the double dash (--) and the arguments after
15// the double dash.
16func Get() ([]string, []string, error) {
17 args := pflag.Args()
18 doubleDashPos := pflag.CommandLine.ArgsLenAtDash()
19
20 if doubleDashPos == -1 {
21 return args, nil, nil
22 }
23 return args[:doubleDashPos], args[doubleDashPos:], nil
24}
25
26// Parse parses command line argument: tasks and global variables
27func Parse(args ...string) ([]*task.Call, *ast.Vars) {

Callers 1

runFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected