| 
						 
						
						
						
						 
					 | 
					 | 
					@ -1,15 +1,15 @@
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					package opts_test
 | 
					 | 
					 | 
					 | 
					package opt_test
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					import (
 | 
					 | 
					 | 
					 | 
					import (
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						"testing"
 | 
					 | 
					 | 
					 | 
						"testing"
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						"go.fifitido.net/cmd/opts"
 | 
					 | 
					 | 
					 | 
						"go.fifitido.net/cmd/opt"
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					)
 | 
					 | 
					 | 
					 | 
					)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					func TestParseUnknownLongOption(t *testing.T) {
 | 
					 | 
					 | 
					 | 
					func TestParseUnknownLongOption(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						set := opts.Set{}
 | 
					 | 
					 | 
					 | 
						set := opt.Set{}
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						args := []string{"--unknown"}
 | 
					 | 
					 | 
					 | 
						args := []string{"--unknown"}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						parser := opts.NewParser(args, set, false)
 | 
					 | 
					 | 
					 | 
						parser := opt.NewParser(args, set, false)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if err == nil {
 | 
					 | 
					 | 
					 | 
						if err == nil {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							t.Error("Expected error")
 | 
					 | 
					 | 
					 | 
							t.Error("Expected error")
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
					 | 
					 | 
					@ -19,9 +19,9 @@ func TestParseUnknownLongOption(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					func TestParseUnknownShortOption(t *testing.T) {
 | 
					 | 
					 | 
					 | 
					func TestParseUnknownShortOption(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						set := opts.Set{}
 | 
					 | 
					 | 
					 | 
						set := opt.Set{}
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						args := []string{"-u"}
 | 
					 | 
					 | 
					 | 
						args := []string{"-u"}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						parser := opts.NewParser(args, set, false)
 | 
					 | 
					 | 
					 | 
						parser := opt.NewParser(args, set, false)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if err == nil {
 | 
					 | 
					 | 
					 | 
						if err == nil {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							t.Error("Expected error")
 | 
					 | 
					 | 
					 | 
							t.Error("Expected error")
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
					 | 
					 | 
					@ -31,12 +31,12 @@ func TestParseUnknownShortOption(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					func TestParseUnknownShortChainedOption1(t *testing.T) {
 | 
					 | 
					 | 
					 | 
					func TestParseUnknownShortChainedOption1(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						set := opts.Set{
 | 
					 | 
					 | 
					 | 
						set := opt.Set{
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							opts.Bool("banana", "b", false, ""),
 | 
					 | 
					 | 
					 | 
							opt.Bool("banana", "b", false, ""),
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							opts.Bool("cucumber", "c", false, ""),
 | 
					 | 
					 | 
					 | 
							opt.Bool("cucumber", "c", false, ""),
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						args := []string{"-abc"}
 | 
					 | 
					 | 
					 | 
						args := []string{"-abc"}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						parser := opts.NewParser(args, set, false)
 | 
					 | 
					 | 
					 | 
						parser := opt.NewParser(args, set, false)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if err == nil {
 | 
					 | 
					 | 
					 | 
						if err == nil {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							t.Error("Expected error")
 | 
					 | 
					 | 
					 | 
							t.Error("Expected error")
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
					 | 
					 | 
					@ -46,12 +46,12 @@ func TestParseUnknownShortChainedOption1(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					func TestParseUnknownShortChainedOption2(t *testing.T) {
 | 
					 | 
					 | 
					 | 
					func TestParseUnknownShortChainedOption2(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						set := opts.Set{
 | 
					 | 
					 | 
					 | 
						set := opt.Set{
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							opts.Bool("apple", "a", false, ""),
 | 
					 | 
					 | 
					 | 
							opt.Bool("apple", "a", false, ""),
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							opts.Bool("cucumber", "c", false, ""),
 | 
					 | 
					 | 
					 | 
							opt.Bool("cucumber", "c", false, ""),
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						args := []string{"-abc"}
 | 
					 | 
					 | 
					 | 
						args := []string{"-abc"}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						parser := opts.NewParser(args, set, false)
 | 
					 | 
					 | 
					 | 
						parser := opt.NewParser(args, set, false)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if err == nil {
 | 
					 | 
					 | 
					 | 
						if err == nil {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							t.Error("Expected error")
 | 
					 | 
					 | 
					 | 
							t.Error("Expected error")
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
					 | 
					 | 
					@ -61,12 +61,12 @@ func TestParseUnknownShortChainedOption2(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					func TestParseUnknownShortChainedOption3(t *testing.T) {
 | 
					 | 
					 | 
					 | 
					func TestParseUnknownShortChainedOption3(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						set := opts.Set{
 | 
					 | 
					 | 
					 | 
						set := opt.Set{
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							opts.Bool("apple", "a", false, ""),
 | 
					 | 
					 | 
					 | 
							opt.Bool("apple", "a", false, ""),
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							opts.Bool("banana", "b", false, ""),
 | 
					 | 
					 | 
					 | 
							opt.Bool("banana", "b", false, ""),
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						args := []string{"-abc"}
 | 
					 | 
					 | 
					 | 
						args := []string{"-abc"}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						parser := opts.NewParser(args, set, false)
 | 
					 | 
					 | 
					 | 
						parser := opt.NewParser(args, set, false)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if err == nil {
 | 
					 | 
					 | 
					 | 
						if err == nil {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							t.Error("Expected error")
 | 
					 | 
					 | 
					 | 
							t.Error("Expected error")
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
					 | 
					 | 
					@ -76,12 +76,12 @@ func TestParseUnknownShortChainedOption3(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					func TestParseUnchaninableOption(t *testing.T) {
 | 
					 | 
					 | 
					 | 
					func TestParseUnchaninableOption(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						set := opts.Set{
 | 
					 | 
					 | 
					 | 
						set := opt.Set{
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							opts.Bool("apple", "a", false, ""),
 | 
					 | 
					 | 
					 | 
							opt.Bool("apple", "a", false, ""),
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							opts.String("banana", "b", "", ""),
 | 
					 | 
					 | 
					 | 
							opt.String("banana", "b", "", ""),
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						args := []string{"-ab"}
 | 
					 | 
					 | 
					 | 
						args := []string{"-ab"}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						parser := opts.NewParser(args, set, false)
 | 
					 | 
					 | 
					 | 
						parser := opt.NewParser(args, set, false)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if err == nil {
 | 
					 | 
					 | 
					 | 
						if err == nil {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							t.Error("Expected error")
 | 
					 | 
					 | 
					 | 
							t.Error("Expected error")
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
					 | 
					 | 
					@ -91,92 +91,92 @@ func TestParseUnchaninableOption(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					func TestParseShortOptionWithValueAndNoSpace(t *testing.T) {
 | 
					 | 
					 | 
					 | 
					func TestParseShortOptionWithValueAndNoSpace(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						opt := opts.String("fruit", "f", "", "")
 | 
					 | 
					 | 
					 | 
						o := opt.String("fruit", "f", "", "")
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						set := opts.Set{opt}
 | 
					 | 
					 | 
					 | 
						set := opt.Set{o}
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						args := []string{"-fapple"}
 | 
					 | 
					 | 
					 | 
						args := []string{"-fapple"}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						parser := opts.NewParser(args, set, false)
 | 
					 | 
					 | 
					 | 
						parser := opt.NewParser(args, set, false)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if err != nil {
 | 
					 | 
					 | 
					 | 
						if err != nil {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							t.Errorf("Expected no error, got: %s", err.Error())
 | 
					 | 
					 | 
					 | 
							t.Errorf("Expected no error, got: %s", err.Error())
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if opt.Value() != "apple" {
 | 
					 | 
					 | 
					 | 
						if o.Value() != "apple" {
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							t.Errorf("Expected fruit to be 'apple', got: %s", opt.Value())
 | 
					 | 
					 | 
					 | 
							t.Errorf("Expected fruit to be 'apple', got: %s", o.Value())
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					func TestParseShortOptionWithValueAndSpace(t *testing.T) {
 | 
					 | 
					 | 
					 | 
					func TestParseShortOptionWithValueAndSpace(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						opt := opts.String("fruit", "f", "", "")
 | 
					 | 
					 | 
					 | 
						o := opt.String("fruit", "f", "", "")
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						set := opts.Set{opt}
 | 
					 | 
					 | 
					 | 
						set := opt.Set{o}
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						args := []string{"-f", "apple"}
 | 
					 | 
					 | 
					 | 
						args := []string{"-f", "apple"}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						parser := opts.NewParser(args, set, false)
 | 
					 | 
					 | 
					 | 
						parser := opt.NewParser(args, set, false)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if err != nil {
 | 
					 | 
					 | 
					 | 
						if err != nil {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							t.Errorf("Expected no error, got: %s", err.Error())
 | 
					 | 
					 | 
					 | 
							t.Errorf("Expected no error, got: %s", err.Error())
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if opt.Value() != "apple" {
 | 
					 | 
					 | 
					 | 
						if o.Value() != "apple" {
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							t.Errorf("Expected fruit to be 'apple', got: %s", opt.Value())
 | 
					 | 
					 | 
					 | 
							t.Errorf("Expected fruit to be 'apple', got: %s", o.Value())
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					func TestParseShortOptionWithValueAndEqual(t *testing.T) {
 | 
					 | 
					 | 
					 | 
					func TestParseShortOptionWithValueAndEqual(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						opt := opts.String("fruit", "f", "", "")
 | 
					 | 
					 | 
					 | 
						o := opt.String("fruit", "f", "", "")
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						set := opts.Set{opt}
 | 
					 | 
					 | 
					 | 
						set := opt.Set{o}
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						args := []string{"-f=apple"}
 | 
					 | 
					 | 
					 | 
						args := []string{"-f=apple"}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						parser := opts.NewParser(args, set, false)
 | 
					 | 
					 | 
					 | 
						parser := opt.NewParser(args, set, false)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if err != nil {
 | 
					 | 
					 | 
					 | 
						if err != nil {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							t.Errorf("Expected no error, got: %s", err.Error())
 | 
					 | 
					 | 
					 | 
							t.Errorf("Expected no error, got: %s", err.Error())
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if opt.Value() != "apple" {
 | 
					 | 
					 | 
					 | 
						if o.Value() != "apple" {
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							t.Errorf("Expected fruit to be 'apple', got: %s", opt.Value())
 | 
					 | 
					 | 
					 | 
							t.Errorf("Expected fruit to be 'apple', got: %s", o.Value())
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					func TestParseLongOptionWithValueAndEqual(t *testing.T) {
 | 
					 | 
					 | 
					 | 
					func TestParseLongOptionWithValueAndEqual(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						opt := opts.String("fruit", "f", "", "")
 | 
					 | 
					 | 
					 | 
						o := opt.String("fruit", "f", "", "")
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						set := opts.Set{opt}
 | 
					 | 
					 | 
					 | 
						set := opt.Set{o}
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						args := []string{"--fruit=apple"}
 | 
					 | 
					 | 
					 | 
						args := []string{"--fruit=apple"}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						parser := opts.NewParser(args, set, false)
 | 
					 | 
					 | 
					 | 
						parser := opt.NewParser(args, set, false)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if err != nil {
 | 
					 | 
					 | 
					 | 
						if err != nil {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							t.Errorf("Expected no error, got: %s", err.Error())
 | 
					 | 
					 | 
					 | 
							t.Errorf("Expected no error, got: %s", err.Error())
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if opt.Value() != "apple" {
 | 
					 | 
					 | 
					 | 
						if o.Value() != "apple" {
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							t.Errorf("Expected fruit to be 'apple', got: %s", opt.Value())
 | 
					 | 
					 | 
					 | 
							t.Errorf("Expected fruit to be 'apple', got: %s", o.Value())
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					func TestParseLongOptionWithValueAndSpace(t *testing.T) {
 | 
					 | 
					 | 
					 | 
					func TestParseLongOptionWithValueAndSpace(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						opt := opts.String("fruit", "f", "", "")
 | 
					 | 
					 | 
					 | 
						o := opt.String("fruit", "f", "", "")
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						set := opts.Set{opt}
 | 
					 | 
					 | 
					 | 
						set := opt.Set{o}
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						args := []string{"--fruit", "apple"}
 | 
					 | 
					 | 
					 | 
						args := []string{"--fruit", "apple"}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						parser := opts.NewParser(args, set, false)
 | 
					 | 
					 | 
					 | 
						parser := opt.NewParser(args, set, false)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if err != nil {
 | 
					 | 
					 | 
					 | 
						if err != nil {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							t.Errorf("Expected no error, got: %s", err.Error())
 | 
					 | 
					 | 
					 | 
							t.Errorf("Expected no error, got: %s", err.Error())
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if opt.Value() != "apple" {
 | 
					 | 
					 | 
					 | 
						if o.Value() != "apple" {
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							t.Errorf("Expected fruit to be 'apple', got: %s", opt.Value())
 | 
					 | 
					 | 
					 | 
							t.Errorf("Expected fruit to be 'apple', got: %s", o.Value())
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					func TestParseOptionTerminator(t *testing.T) {
 | 
					 | 
					 | 
					 | 
					func TestParseOptionTerminator(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						opt := opts.String("fruit", "f", "banana", "")
 | 
					 | 
					 | 
					 | 
						o := opt.String("fruit", "f", "banana", "")
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						set := opts.Set{opt}
 | 
					 | 
					 | 
					 | 
						set := opt.Set{o}
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						args := []string{"--fruit", "apple", "--", "hello", "world"}
 | 
					 | 
					 | 
					 | 
						args := []string{"--fruit", "apple", "--", "hello", "world"}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						parser := opts.NewParser(args, set, false)
 | 
					 | 
					 | 
					 | 
						parser := opt.NewParser(args, set, false)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						restArgs, err := parser.Parse()
 | 
					 | 
					 | 
					 | 
						restArgs, err := parser.Parse()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if err != nil {
 | 
					 | 
					 | 
					 | 
						if err != nil {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							t.Errorf("Expected no error, got: %s", err.Error())
 | 
					 | 
					 | 
					 | 
							t.Errorf("Expected no error, got: %s", err.Error())
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if opt.Value() != "apple" {
 | 
					 | 
					 | 
					 | 
						if o.Value() != "apple" {
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							t.Errorf("Expected fruit to be 'apple', got: %s", opt.Value())
 | 
					 | 
					 | 
					 | 
							t.Errorf("Expected fruit to be 'apple', got: %s", o.Value())
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if len(restArgs) != 2 {
 | 
					 | 
					 | 
					 | 
						if len(restArgs) != 2 {
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
					 | 
					 | 
					@ -193,9 +193,9 @@ func TestParseOptionTerminator(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					func TestParseLongOptionIgnoreUnknown(t *testing.T) {
 | 
					 | 
					 | 
					 | 
					func TestParseLongOptionIgnoreUnknown(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						set := opts.Set{}
 | 
					 | 
					 | 
					 | 
						set := opt.Set{}
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						args := []string{"--unknown", "hello", "world"}
 | 
					 | 
					 | 
					 | 
						args := []string{"--unknown", "hello", "world"}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						parser := opts.NewParser(args, set, true)
 | 
					 | 
					 | 
					 | 
						parser := opt.NewParser(args, set, true)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						restArgs, err := parser.Parse()
 | 
					 | 
					 | 
					 | 
						restArgs, err := parser.Parse()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if err != nil {
 | 
					 | 
					 | 
					 | 
						if err != nil {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							t.Errorf("Expected no error, got: %s", err.Error())
 | 
					 | 
					 | 
					 | 
							t.Errorf("Expected no error, got: %s", err.Error())
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
					 | 
					 | 
					@ -215,9 +215,9 @@ func TestParseLongOptionIgnoreUnknown(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					func TestParseShortOptionIgnoreUnknown(t *testing.T) {
 | 
					 | 
					 | 
					 | 
					func TestParseShortOptionIgnoreUnknown(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						set := opts.Set{}
 | 
					 | 
					 | 
					 | 
						set := opt.Set{}
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						args := []string{"-q"}
 | 
					 | 
					 | 
					 | 
						args := []string{"-q"}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						parser := opts.NewParser(args, set, true)
 | 
					 | 
					 | 
					 | 
						parser := opt.NewParser(args, set, true)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if err != nil {
 | 
					 | 
					 | 
					 | 
						if err != nil {
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
					 | 
					 | 
					@ -226,12 +226,12 @@ func TestParseShortOptionIgnoreUnknown(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					func TestParseChainedShortOptionIgnoreUnknown(t *testing.T) {
 | 
					 | 
					 | 
					 | 
					func TestParseChainedShortOptionIgnoreUnknown(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						apple := opts.Bool("apple", "a", false, "")
 | 
					 | 
					 | 
					 | 
						apple := opt.Bool("apple", "a", false, "")
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						banana := opts.Bool("banana", "b", false, "")
 | 
					 | 
					 | 
					 | 
						banana := opt.Bool("banana", "b", false, "")
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						cucumber := opts.Bool("cucumber", "c", false, "")
 | 
					 | 
					 | 
					 | 
						cucumber := opt.Bool("cucumber", "c", false, "")
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						set := opts.Set{apple, banana, cucumber}
 | 
					 | 
					 | 
					 | 
						set := opt.Set{apple, banana, cucumber}
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						args := []string{"-adc"}
 | 
					 | 
					 | 
					 | 
						args := []string{"-adc"}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						parser := opts.NewParser(args, set, true)
 | 
					 | 
					 | 
					 | 
						parser := opt.NewParser(args, set, true)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if err != nil {
 | 
					 | 
					 | 
					 | 
						if err != nil {
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
					 | 
					 | 
					@ -252,25 +252,25 @@ func TestParseChainedShortOptionIgnoreUnknown(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					func TestParseSingleDashValue(t *testing.T) {
 | 
					 | 
					 | 
					 | 
					func TestParseSingleDashValue(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						opt := opts.String("fruit", "f", "", "")
 | 
					 | 
					 | 
					 | 
						o := opt.String("fruit", "f", "", "")
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						set := opts.Set{opt}
 | 
					 | 
					 | 
					 | 
						set := opt.Set{o}
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						args := []string{"-f-"}
 | 
					 | 
					 | 
					 | 
						args := []string{"-f-"}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						parser := opts.NewParser(args, set, false)
 | 
					 | 
					 | 
					 | 
						parser := opt.NewParser(args, set, false)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if err != nil {
 | 
					 | 
					 | 
					 | 
						if err != nil {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							t.Errorf("Expected no error, got: %s", err.Error())
 | 
					 | 
					 | 
					 | 
							t.Errorf("Expected no error, got: %s", err.Error())
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if opt.Value() != "-" {
 | 
					 | 
					 | 
					 | 
						if o.Value() != "-" {
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							t.Errorf("Expected fruit to be '-', got: %s", opt.Value())
 | 
					 | 
					 | 
					 | 
							t.Errorf("Expected fruit to be '-', got: %s", o.Value())
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					func TestParseLongOptionBadValue(t *testing.T) {
 | 
					 | 
					 | 
					 | 
					func TestParseLongOptionBadValue(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						opt := opts.Int("fruit", "f", 0, "")
 | 
					 | 
					 | 
					 | 
						o := opt.Int("fruit", "f", 0, "")
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						set := opts.Set{opt}
 | 
					 | 
					 | 
					 | 
						set := opt.Set{o}
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						args := []string{"--fruit=five"}
 | 
					 | 
					 | 
					 | 
						args := []string{"--fruit=five"}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						parser := opts.NewParser(args, set, false)
 | 
					 | 
					 | 
					 | 
						parser := opt.NewParser(args, set, false)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if err == nil {
 | 
					 | 
					 | 
					 | 
						if err == nil {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							t.Error("Expected error")
 | 
					 | 
					 | 
					 | 
							t.Error("Expected error")
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
					 | 
					 | 
					@ -278,10 +278,10 @@ func TestParseLongOptionBadValue(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					func TestParseShortOptionWithSpaceBadValue(t *testing.T) {
 | 
					 | 
					 | 
					 | 
					func TestParseShortOptionWithSpaceBadValue(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						opt := opts.Int("fruit", "f", 0, "")
 | 
					 | 
					 | 
					 | 
						o := opt.Int("fruit", "f", 0, "")
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						set := opts.Set{opt}
 | 
					 | 
					 | 
					 | 
						set := opt.Set{o}
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						args := []string{"-f", "five"}
 | 
					 | 
					 | 
					 | 
						args := []string{"-f", "five"}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						parser := opts.NewParser(args, set, false)
 | 
					 | 
					 | 
					 | 
						parser := opt.NewParser(args, set, false)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if err == nil {
 | 
					 | 
					 | 
					 | 
						if err == nil {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							t.Error("Expected error")
 | 
					 | 
					 | 
					 | 
							t.Error("Expected error")
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
					 | 
					 | 
					@ -289,11 +289,11 @@ func TestParseShortOptionWithSpaceBadValue(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					func TestParseShortOptionWithoutEqualBadValue(t *testing.T) {
 | 
					 | 
					 | 
					 | 
					func TestParseShortOptionWithoutEqualBadValue(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						optG := opts.Bool("green", "g", false, "")
 | 
					 | 
					 | 
					 | 
						og := opt.Bool("green", "g", false, "")
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						optF := opts.Int("fruit", "f", 0, "")
 | 
					 | 
					 | 
					 | 
						of := opt.Int("fruit", "f", 0, "")
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						set := opts.Set{optG, optF}
 | 
					 | 
					 | 
					 | 
						set := opt.Set{og, of}
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						args := []string{"-ffive"}
 | 
					 | 
					 | 
					 | 
						args := []string{"-ffive"}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						parser := opts.NewParser(args, set, false)
 | 
					 | 
					 | 
					 | 
						parser := opt.NewParser(args, set, false)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if err == nil {
 | 
					 | 
					 | 
					 | 
						if err == nil {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							t.Error("Expected error")
 | 
					 | 
					 | 
					 | 
							t.Error("Expected error")
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
					 | 
					 | 
					@ -301,11 +301,11 @@ func TestParseShortOptionWithoutEqualBadValue(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					func TestParseShortOptionWithEqualBadValue(t *testing.T) {
 | 
					 | 
					 | 
					 | 
					func TestParseShortOptionWithEqualBadValue(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						optG := opts.Bool("green", "g", false, "")
 | 
					 | 
					 | 
					 | 
						og := opt.Bool("green", "g", false, "")
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						optF := opts.Int("fruit", "f", 0, "")
 | 
					 | 
					 | 
					 | 
						of := opt.Int("fruit", "f", 0, "")
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						set := opts.Set{optG, optF}
 | 
					 | 
					 | 
					 | 
						set := opt.Set{og, of}
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						args := []string{"-f=five"}
 | 
					 | 
					 | 
					 | 
						args := []string{"-f=five"}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						parser := opts.NewParser(args, set, false)
 | 
					 | 
					 | 
					 | 
						parser := opt.NewParser(args, set, false)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if err == nil {
 | 
					 | 
					 | 
					 | 
						if err == nil {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							t.Error("Expected error")
 | 
					 | 
					 | 
					 | 
							t.Error("Expected error")
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
					 | 
					 | 
					@ -313,10 +313,10 @@ func TestParseShortOptionWithEqualBadValue(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					func TestParseLongOptionMissingValue(t *testing.T) {
 | 
					 | 
					 | 
					 | 
					func TestParseLongOptionMissingValue(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						opt := opts.Float("fruit-price", "f", 0, "")
 | 
					 | 
					 | 
					 | 
						o := opt.Float("fruit-price", "f", 0, "")
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						set := opts.Set{opt}
 | 
					 | 
					 | 
					 | 
						set := opt.Set{o}
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						args := []string{"--fruit-price"}
 | 
					 | 
					 | 
					 | 
						args := []string{"--fruit-price"}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						parser := opts.NewParser(args, set, false)
 | 
					 | 
					 | 
					 | 
						parser := opt.NewParser(args, set, false)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if err == nil {
 | 
					 | 
					 | 
					 | 
						if err == nil {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							t.Error("Expected error")
 | 
					 | 
					 | 
					 | 
							t.Error("Expected error")
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
					 | 
					 | 
					@ -324,10 +324,10 @@ func TestParseLongOptionMissingValue(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					func TestParseShortOptionMissingValue(t *testing.T) {
 | 
					 | 
					 | 
					 | 
					func TestParseShortOptionMissingValue(t *testing.T) {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						opt := opts.Float("fruit-price", "f", 0, "")
 | 
					 | 
					 | 
					 | 
						o := opt.Float("fruit-price", "f", 0, "")
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						set := opts.Set{opt}
 | 
					 | 
					 | 
					 | 
						set := opt.Set{o}
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						args := []string{"-f"}
 | 
					 | 
					 | 
					 | 
						args := []string{"-f"}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						parser := opts.NewParser(args, set, false)
 | 
					 | 
					 | 
					 | 
						parser := opt.NewParser(args, set, false)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
					 | 
					 | 
					 | 
						_, err := parser.Parse()
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						if err == nil {
 | 
					 | 
					 | 
					 | 
						if err == nil {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							t.Error("Expected error")
 | 
					 | 
					 | 
					 | 
							t.Error("Expected error")
 |