summaryrefslogtreecommitdiff
path: root/usage.go
diff options
context:
space:
mode:
Diffstat (limited to 'usage.go')
-rw-r--r--usage.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/usage.go b/usage.go
index 656ee9a..cfac563 100644
--- a/usage.go
+++ b/usage.go
@@ -1,12 +1,12 @@
package arg
import (
+ "encoding"
"fmt"
"io"
"os"
"reflect"
"strings"
- "encoding"
)
// the width of the left column
@@ -22,7 +22,7 @@ func (p *Parser) Fail(msg string) {
// WriteUsage writes usage information to the given writer
func (p *Parser) WriteUsage(w io.Writer) {
var positionals, options []*spec
- for _, spec := range p.spec {
+ for _, spec := range p.specs {
if spec.positional {
positionals = append(positionals, spec)
} else {
@@ -72,7 +72,7 @@ func (p *Parser) WriteUsage(w io.Writer) {
// WriteHelp writes the usage string followed by the full help string for each option
func (p *Parser) WriteHelp(w io.Writer) {
var positionals, options []*spec
- for _, spec := range p.spec {
+ for _, spec := range p.specs {
if spec.positional {
positionals = append(positionals, spec)
} else {