
We forgot to run typecheckrpc.go periodically and it didn't work anymore and there were some minor errors in service/rpc2/client.go. Rewrite typecheckrpc.go using go/packages, so that it works with go1.11 and go.mod, and fix the issues in client.go
32 lines
1.0 KiB
Markdown
32 lines
1.0 KiB
Markdown
# Argv
|
|
|
|
[](https://godoc.org/github.com/cosiner/argv)
|
|
[](https://travis-ci.org/cosiner/argv)
|
|
[](https://coveralls.io/github/cosiner/argv)
|
|
[](https://goreportcard.com/report/github.com/cosiner/argv)
|
|
|
|
Argv is a library for [Go](https://golang.org) to split command line string into arguments array.
|
|
|
|
# Documentation
|
|
Documentation can be found at [Godoc](https://godoc.org/github.com/cosiner/argv)
|
|
|
|
# Example
|
|
```Go
|
|
func TestArgv(t *testing.T) {
|
|
args, err := argv.Argv([]rune(" ls `echo /` | wc -l "), os.Environ(), argv.Run)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
expects := [][]string{
|
|
[]string{"ls", "/"},
|
|
[]string{"wc", "-l"},
|
|
}
|
|
if !reflect.DeepDqual(args, expects) {
|
|
t.Fatal(args)
|
|
}
|
|
}
|
|
```
|
|
|
|
# LICENSE
|
|
MIT.
|