Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
make fetchIP unexported
Browse files Browse the repository at this point in the history
Signed-off-by: Jason McCallister <jason@craftcms.com>
  • Loading branch information
jasonmccallister committed Mar 11, 2020
1 parent 20cb1d5 commit 64fdb9b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions internal/command/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion internal/command/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion internal/command/ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 64fdb9b

Please # to comment.