From 64fdb9b1a2aa68044f70a1529fd78d508297676b Mon Sep 17 00:00:00 2001 From: Jason McCallister Date: Wed, 11 Mar 2020 15:31:35 -0400 Subject: [PATCH] make fetchIP unexported Signed-off-by: Jason McCallister --- internal/command/bootstrap.go | 8 +++++--- internal/command/fetch.go | 2 +- internal/command/ip.go | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/internal/command/bootstrap.go b/internal/command/bootstrap.go index dedb006f..ffc9a358 100644 --- a/internal/command/bootstrap.go +++ b/internal/command/bootstrap.go @@ -18,7 +18,9 @@ func Bootstrap(r Runner) *cli.Command { Action: func(c *cli.Context) error { return bootstrapAction(c, r) }, - After: bootstrapAfterAction, + After: func(c *cli.Context) error { + return bootstrapAfterAction(c, r) + }, Flags: []cli.Flag{ phpVersionFlag, databaseFlag, @@ -46,8 +48,8 @@ func bootstrapAction(c *cli.Context, r Runner) error { return r.Run([]string{"exec", machine, "--", "sudo", "bash", "/opt/nitro/bootstrap.sh", php, database}) } -func bootstrapAfterAction(c *cli.Context) error { - ip, err := FetchIP(c.String("machine"), r) +func bootstrapAfterAction(c *cli.Context, r Runner) error { + ip, err := fetchIP(c.String("machine"), r) if err != nil { return err } diff --git a/internal/command/fetch.go b/internal/command/fetch.go index eeeab437..bd5b99c4 100644 --- a/internal/command/fetch.go +++ b/internal/command/fetch.go @@ -6,7 +6,7 @@ import ( "os/exec" ) -func FetchIP(machine string, r Runner) (string, error) { +func fetchIP(machine string, r Runner) (string, error) { cmd := exec.Command(r.Path(), "list", "--format", "json") type listOutput struct { diff --git a/internal/command/ip.go b/internal/command/ip.go index 31441fd3..9628321a 100644 --- a/internal/command/ip.go +++ b/internal/command/ip.go @@ -18,7 +18,7 @@ func IP(r Runner) *cli.Command { } func ipAction(c *cli.Context, r Runner) error { - ip, err := FetchIP(c.String("machine"), r) + ip, err := fetchIP(c.String("machine"), r) if err != nil { return err }