MCPcopy Index your code
hub / github.com/cosiner/argv

github.com/cosiner/argv @v0.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.0 ↗ · + Follow
31 symbols 62 edges 6 files 10 documented · 32% 8 cross-repo links updated 6y ago★ 43
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Argv

GoDoc Build Status Coverage Status Go Report Card

Argv is a library for Go to split command line string into arguments array.

Documentation

Documentation can be found at Godoc

Example

func TestArgv(t *testing.T) {
    args, err := argv.Argv([]rune(" ls   `echo /`   |  wc  -l "), argv.ParseEnv(os.Environ()), argv.Run)
    if err != nil {
        t.Fatal(err)
    }
    expects := [][]string{
        []string{"ls", "/"},
        []string{"wc", "-l"},
    }
    if !reflect.DeepEqual(args, expects) {
        t.Fatal(args)
    }
}

LICENSE

MIT.

Extension points exported contracts — how you extend this code

Expander (FuncType)
(no doc)
parser.go

Core symbols most depended-on inside this repo

unreadRune
called by 5
scanner.go
nextToken
called by 3
parser.go
accept
called by 3
parser.go
nextRune
called by 3
scanner.go
unreadToken
called by 2
parser.go
optional
called by 2
parser.go
NewScanner
called by 2
scanner.go
Next
called by 2
scanner.go

Shape

Method 16
Function 8
Struct 5
FuncType 1
TypeAlias 1

Languages

Go100%

Modules by API surface

parser.go16 symbols
scanner.go9 symbols
cmd.go2 symbols
argv_test.go2 symbols
scanner_test.go1 symbols
argv.go1 symbols

For agents

$ claude mcp add argv \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page