Merge "Fixed calls to formatting functions"

This commit is contained in:
Brad Fitzpatrick 2014-07-21 22:24:26 +00:00 committed by Gerrit Code Review
commit 7bd5e287d4
3 changed files with 3 additions and 3 deletions

View File

@ -179,7 +179,7 @@ func (a *Handler) Start() error {
if e := os.Getenv("CAMLI_APP_BINDIR"); e != "" { if e := os.Getenv("CAMLI_APP_BINDIR"); e != "" {
binPath, err = exec.LookPath(filepath.Join(e, name)) binPath, err = exec.LookPath(filepath.Join(e, name))
if err != nil { if err != nil {
log.Printf("%q executable not found in %q", e) log.Printf("%q executable not found in %q", name, e)
} }
} }
if binPath == "" || err != nil { if binPath == "" || err != nil {

View File

@ -61,7 +61,7 @@ func (hl *handlerLoader) initPublisherRootNode(ah *app.Handler) error {
} }
camliRoot, ok := appConfig["camliRoot"].(string) camliRoot, ok := appConfig["camliRoot"].(string)
if !ok { if !ok {
return fmt.Errorf("camliRoot in publisher app handler appConfig is %T, want string, was %T", appConfig["camliRoot"]) return fmt.Errorf("camliRoot in publisher app handler appConfig is %T, want string", appConfig["camliRoot"])
} }
result, err := camliRootQuery(camliRoot) result, err := camliRootQuery(camliRoot)
if err == nil && len(result.Blobs) > 0 && result.Blobs[0].Blob.Valid() { if err == nil && len(result.Blobs) > 0 && result.Blobs[0].Blob.Valid() {

View File

@ -176,7 +176,7 @@ func genSelfTLS(listen string) error {
keyOut, err := os.OpenFile(defKey, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600) keyOut, err := os.OpenFile(defKey, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600)
if err != nil { if err != nil {
return fmt.Errorf("failed to open %s for writing:", defKey, err) return fmt.Errorf("failed to open %s for writing: %s", defKey, err)
} }
pem.Encode(keyOut, &pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(priv)}) pem.Encode(keyOut, &pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(priv)})
keyOut.Close() keyOut.Close()