Switch to circleci.
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
version: 2
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
docker:
|
||||||
|
- image: circleci/golang:1.10
|
||||||
|
|
||||||
|
working_directory: /go/src/github.com/alecthomas/kong
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run: go get -v -t -d ./...
|
||||||
|
- run: go test -v ./...
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# Kong is a command-line parser for Go
|
# Kong is a command-line parser for Go [](https://circleci.com/gh/alecthomas/kong)
|
||||||
|
|
||||||
It parses a command-line into a struct. eg.
|
It parses a command-line into a struct. eg.
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import (
|
|||||||
const defaultHelp = `{{- with .Application -}}
|
const defaultHelp = `{{- with .Application -}}
|
||||||
usage: {{.Name}}
|
usage: {{.Name}}
|
||||||
|
|
||||||
|
{{.Help}}
|
||||||
|
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
`
|
`
|
||||||
|
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ func (k *Kong) applyNode(scan *Scanner, node *Node, flags []*Flag) (command []st
|
|||||||
}
|
}
|
||||||
args = append(args, token.Value)
|
args = append(args, token.Value)
|
||||||
}
|
}
|
||||||
|
// Note: tokens must be pushed in reverse order.
|
||||||
for i := range args {
|
for i := range args {
|
||||||
scan.PushTyped(args[len(args)-1-i], PositionalArgumentToken)
|
scan.PushTyped(args[len(args)-1-i], PositionalArgumentToken)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user