From 4fc241fb17ec6371aedd3beaf8af22647bb16369 Mon Sep 17 00:00:00 2001 From: Jesse Szwedko Date: Sun, 15 Nov 2015 13:07:28 -0800 Subject: [PATCH] Update examples to use correct naming convention See https://golang.org/pkg/testing/#hdr-Examples --- app_test.go | 8 ++++---- cli_test.go | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app_test.go b/app_test.go index ada5d69..28d8e0f 100644 --- a/app_test.go +++ b/app_test.go @@ -10,7 +10,7 @@ import ( "testing" ) -func ExampleApp() { +func ExampleApp_Run() { // set args for examples sake os.Args = []string{"greet", "--name", "Jeremy"} @@ -30,7 +30,7 @@ func ExampleApp() { // Hello Jeremy } -func ExampleAppSubcommand() { +func ExampleApp_Run_subcommand() { // set args for examples sake os.Args = []string{"say", "hi", "english", "--name", "Jeremy"} app := NewApp() @@ -67,7 +67,7 @@ func ExampleAppSubcommand() { // Hello, Jeremy } -func ExampleAppHelp() { +func ExampleApp_Run_help() { // set args for examples sake os.Args = []string{"greet", "h", "describeit"} @@ -99,7 +99,7 @@ func ExampleAppHelp() { // This is how we describe describeit the function } -func ExampleAppBashComplete() { +func ExampleApp_Run_bashComplete() { // set args for examples sake os.Args = []string{"greet", "--generate-bash-completion"} diff --git a/cli_test.go b/cli_test.go index e54f8e2..4488939 100644 --- a/cli_test.go +++ b/cli_test.go @@ -4,7 +4,7 @@ import ( "os" ) -func Example() { +func Example_App_Run() { app := NewApp() app.Name = "todo" app.Usage = "task list on the command line" @@ -30,7 +30,7 @@ func Example() { app.Run(os.Args) } -func ExampleSubcommand() { +func Example_App_Run_subcommand() { app := NewApp() app.Name = "say" app.Commands = []Command{