Skip to content

Commit

Permalink
Revert "Fix formatting of FPrintf statements"
Browse files Browse the repository at this point in the history
This reverts commit e9f82dd.
  • Loading branch information
brian-nguyen committed Jul 10, 2018
1 parent 1cd7d9c commit c5fbe7a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
24 changes: 12 additions & 12 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ func (c *Client) SetSSLVerification(verify bool) {
// public-private key-pair. It outputs configuration information
// for the user.
func (c *Client) BootstrapRemote(repoName string) error {
fmt.Fprintf(c.out, "Setting up remote %s at %s\n", c.Name, c.IP)
fmt.Fprintf(c.out, "Setting up remote %s at %s", c.Name, c.IP)

fmt.Fprintln(c.out, ">> Step 1/4: Installing docker...")
fmt.Fprint(c.out, ">> Step 1/4: Installing docker...")
err := c.installDocker(c.sshRunner)
if err != nil {
return err
}

fmt.Fprintln(c.out, "\n>> Step 2/4: Building deploy key...")
fmt.Fprint(c.out, "\n>> Step 2/4: Building deploy key...")
if err != nil {
return err
}
Expand All @@ -88,7 +88,7 @@ func (c *Client) BootstrapRemote(repoName string) error {

// This step needs to run before any other commands that rely on
// the daemon image, since the daemon is loaded here.
fmt.Fprintln(c.out, "\n>> Step 3/4: Starting daemon...")
fmt.Fprint(c.out, "\n>> Step 3/4: Starting daemon...")
if err != nil {
return err
}
Expand All @@ -97,32 +97,32 @@ func (c *Client) BootstrapRemote(repoName string) error {
return err
}

fmt.Fprintln(c.out, "\n>> Step 4/4: Fetching daemon API token...")
fmt.Fprint(c.out, "\n>> Step 4/4: Fetching daemon API token...")
token, err := c.getDaemonAPIToken(c.sshRunner, c.version)
if err != nil {
return err
}
c.Daemon.Token = token

fmt.Fprintln(c.out, "\nInertia has been set up and daemon is running on remote!")
fmt.Fprintln(c.out, "You may have to wait briefly for Inertia to set up some dependencies.")
fmt.Fprint(c.out, "\nInertia has been set up and daemon is running on remote!")
fmt.Fprint(c.out, "You may have to wait briefly for Inertia to set up some dependencies.")
fmt.Fprintf(c.out, "Use 'inertia %s logs --stream' to check on the daemon's setup progress.\n\n", c.Name)

fmt.Fprint(c.out, "=============================\n")

// Output deploy key to user.
fmt.Fprintf(c.out, ">> GitHub Deploy Key (add to https://www.github.com/%s/settings/keys/new):\n", repoName)
fmt.Fprintf(c.out, ">> GitHub Deploy Key (add to https://www.github.com/%s/settings/keys/new): ", repoName)
fmt.Fprint(c.out, pub.String())

// Output Webhook url to user.
fmt.Fprintf(c.out, ">> GitHub WebHook URL (add to https://www.github.com/%s/settings/hooks/new):\n", repoName)
fmt.Fprintf(c.out, "WebHook Address: https://%s:%s/webhook\n", c.IP, c.Daemon.Port)
fmt.Fprintln(c.out, "WebHook Secret: "+c.Daemon.WebHookSecret)
fmt.Fprintf(c.out, ">> GitHub WebHook URL (add to https://www.github.com/%s/settings/hooks/new): ", repoName)
fmt.Fprintf(c.out, "WebHook Address: https://%s:%s/webhook", c.IP, c.Daemon.Port)
fmt.Fprint(c.out, "WebHook Secret: "+c.Daemon.WebHookSecret)
fmt.Fprint(c.out, `Note that you will have to disable SSH verification in your webhook
settings - Inertia uses self-signed certificates that GitHub won't
be able to verify.`+"\n")

fmt.Fprintln(c.out, `Inertia daemon successfully deployed! Add your webhook url and deploy
fmt.Fprint(c.out, `Inertia daemon successfully deployed! Add your webhook url and deploy
key to enable continuous deployment.`)
fmt.Fprintf(c.out, "Then run 'inertia %s up' to deploy your application.\n", c.Name)

Expand Down
2 changes: 1 addition & 1 deletion daemon/inertiad/auth/permissions.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ func (h *PermissionsHandler) listUsersHandler(w http.ResponseWriter, r *http.Req
if len(users) != 0 {
fmt.Fprintf(w, "[SUCCESS %d] Users: \n%s\n", http.StatusOK, userList)
} else {
fmt.Fprintf(w, "[SUCCESS %d] No users registered.\n", http.StatusOK)
fmt.Fprintf(w, "[SUCCESS %d] No users registered.", http.StatusOK)
}
}

Expand Down
2 changes: 1 addition & 1 deletion provision/ec2.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func (p *EC2Provisioner) CreateInstance(opts EC2CreateInstanceOptions) (*cfg.Rem
},
})
if err != nil {
fmt.Fprintf(p.out, "Failed to set tags: %s\n", err.Error())
fmt.Fprintf(p.out, "Failed to set tags: %s", err.Error())
}

// Poll for SSH port to open
Expand Down

0 comments on commit c5fbe7a

Please sign in to comment.