Skip to content

Commit bb7d0d6

Browse files
committed
Rename home command to info
1 parent 9bd5358 commit bb7d0d6

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

handlers/home.go renamed to handlers/info.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/exercism/cli/config"
99
)
1010

11-
func Home(ctx *cli.Context) {
11+
func Info(ctx *cli.Context) {
1212
path, err := config.Path(ctx.GlobalString("config"))
1313
if err != nil {
1414
log.Fatal(err)
@@ -17,5 +17,8 @@ func Home(ctx *cli.Context) {
1717
if err != nil {
1818
log.Fatal(err)
1919
}
20-
fmt.Printf("Your exercism directory can be found at %s\n", c.Dir)
20+
fmt.Println("API Key:", c.APIKey)
21+
fmt.Println("Exercises Directory:", c.Dir)
22+
fmt.Println("Config file:", c.File())
23+
fmt.Println("API:", c.Hostname)
2124
}

main.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,10 @@ func main() {
7979
Action: handlers.Configure,
8080
},
8181
{
82-
Name: "home",
83-
Usage: "Output path to exercises directory",
84-
Action: handlers.Home,
82+
Name: "info",
83+
ShortName: "i",
84+
Usage: "output config info",
85+
Action: handlers.Info,
8586
},
8687
{
8788
Name: "current",

0 commit comments

Comments
 (0)