Browse Source

add .travis.yml

Alex Flint 10 years ago
parent
commit
f042ab6386
3 changed files with 11 additions and 3 deletions
  1. +7
    -0
      .travis.yml
  2. +1
    -1
      example_test.go
  3. +3
    -2
      parse.go

+ 7
- 0
.travis.yml View File

@ -0,0 +1,7 @@
language: go
go:
- 1.4
- tip
install:
- go get ./...
- go get -t ./...

+ 1
- 1
example_test.go View File

@ -74,7 +74,7 @@ func Example_MultipleValues() {
}
// This example shows the usage string generated by go-arg
func Example_Usage() {
func Example_UsageString() {
// These are the args you would pass in on the command line
os.Args = []string{"--help"}


+ 3
- 2
parse.go View File

@ -1,5 +1,6 @@
// Package arg parses command line arguments using the fields from a struct.
// Any exported field is interpreted as a command line option, so
//
// For example,
//
// var args struct {
// Iter int
@ -9,7 +10,7 @@
//
// defines two command line arguments, which can be set using any of
//
// ./example --iter=1 --bar // bar is a boolean flag so its value is optional
// ./example --iter=1 --bar // bar is a boolean flag so its value is set to true
// ./example -iter 1 // bar will default to its zero value
// ./example --bar=true // foo will default to its zero value
//


Loading…
Cancel
Save