forked from urfave/cli
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
*mail.Address
instead of custom *Author
type
Supports urfave#1586
- Loading branch information
1 parent
64cc3be
commit e7a8e35
Showing
6 changed files
with
17 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ import ( | |
"flag" | ||
"fmt" | ||
"io" | ||
"net/mail" | ||
"os" | ||
"reflect" | ||
"strconv" | ||
|
@@ -45,7 +46,7 @@ func ExampleApp_Run() { | |
return nil | ||
}, | ||
UsageText: "app [first_arg] [second_arg]", | ||
Authors: []*Author{{Name: "Oliver Allen", Email: "[email protected]"}}, | ||
Authors: []*mail.Address{{Name: "Oliver Allen", Address: "[email protected]"}}, | ||
} | ||
|
||
app.Run(os.Args) | ||
|
@@ -100,9 +101,9 @@ func ExampleApp_Run_appHelp() { | |
Name: "greet", | ||
Version: "0.1.0", | ||
Description: "This is how we describe greet the app", | ||
Authors: []*Author{ | ||
{Name: "Harrison", Email: "[email protected]"}, | ||
{Name: "Oliver Allen", Email: "[email protected]"}, | ||
Authors: []*mail.Address{ | ||
{Name: "Harrison", Address: "[email protected]"}, | ||
{Name: "Oliver Allen", Address: "[email protected]"}, | ||
}, | ||
Flags: []Flag{ | ||
&StringFlag{Name: "name", Value: "bob", Usage: "a name to say"}, | ||
|
@@ -135,8 +136,8 @@ func ExampleApp_Run_appHelp() { | |
// This is how we describe greet the app | ||
// | ||
// AUTHORS: | ||
// Harrison <[email protected]> | ||
// Oliver Allen <[email protected]> | ||
// "Harrison" <[email protected]> | ||
// "Oliver Allen" <[email protected]> | ||
// | ||
// COMMANDS: | ||
// describeit, d use it to see a description | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ package cli | |
|
||
import ( | ||
"bytes" | ||
"net/mail" | ||
"os" | ||
"testing" | ||
) | ||
|
@@ -127,9 +128,9 @@ Should be a part of the same code block | |
app.UsageText = "app [first_arg] [second_arg]" | ||
app.Description = `Description of the application.` | ||
app.Usage = "Some app" | ||
app.Authors = []*Author{ | ||
{Name: "Harrison", Email: "[email protected]"}, | ||
{Name: "Oliver Allen", Email: "[email protected]"}, | ||
app.Authors = []*mail.Address{ | ||
{Name: "Harrison", Address: "[email protected]"}, | ||
{Name: "Oliver Allen", Address: "[email protected]"}, | ||
} | ||
return app | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters