summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml7
-rw-r--r--example_test.go2
-rw-r--r--parse.go5
3 files changed, 11 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..2097b79
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,7 @@
+language: go
+go:
+ - 1.4
+ - tip
+install:
+ - go get ./...
+ - go get -t ./...
diff --git a/example_test.go b/example_test.go
index d2febf6..5e2a905 100644
--- a/example_test.go
+++ b/example_test.go
@@ -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"}
diff --git a/parse.go b/parse.go
index f8e8cf4..f9c4e62 100644
--- a/parse.go
+++ b/parse.go
@@ -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
//