-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix go vet errors related to string formats
Stupid programmer errors.
- Loading branch information
Showing
6 changed files
with
14 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,15 +54,15 @@ func listCerts(c *cli.Context) error { | |
|
||
getResp, err := http.Get(config.SignerUrl + "cert/requests") | ||
if err != nil { | ||
return cli.NewExitError(fmt.Sprintf("Didn't get a valid response", err), 1) | ||
return cli.NewExitError(fmt.Sprintf("Didn't get a valid response: %s", err), 1) | ||
} | ||
getRespBuf, err := ioutil.ReadAll(getResp.Body) | ||
if err != nil { | ||
return cli.NewExitError(fmt.Sprintf("Error reading response body", err), 1) | ||
return cli.NewExitError(fmt.Sprintf("Error reading response body: %s", err), 1) | ||
} | ||
getResp.Body.Close() | ||
if getResp.StatusCode != 200 { | ||
return cli.NewExitError(fmt.Sprintf("Error getting listing of certs", string(getRespBuf)), 1) | ||
return cli.NewExitError(fmt.Sprintf("Error getting listing of certs: %s", string(getRespBuf)), 1) | ||
} | ||
|
||
certs := make(certRequestResponse) | ||
|
@@ -71,11 +71,11 @@ func listCerts(c *cli.Context) error { | |
if showAll || !respElement.Signed { | ||
rawCert, err := base64.StdEncoding.DecodeString(respElement.CertBlob) | ||
if err != nil { | ||
return cli.NewExitError(fmt.Sprintf("Trouble base64 decoding response:", err, respElement.CertBlob), 1) | ||
return cli.NewExitError(fmt.Sprintf("Trouble base64 decoding response '%s': %s", err, respElement.CertBlob), 1) | ||
} | ||
pubKey, err := ssh.ParsePublicKey(rawCert) | ||
if err != nil { | ||
return cli.NewExitError(fmt.Sprintf("Trouble parsing response:", err), 1) | ||
return cli.NewExitError(fmt.Sprintf("Trouble parsing response: %s", err), 1) | ||
} | ||
cert := *pubKey.(*ssh.Certificate) | ||
env, ok := cert.Extensions["[email protected]"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters