Minor fix for go vet
This commit is contained in:
parent
971e2c3bd6
commit
e3d3d424b2
2 changed files with 3 additions and 3 deletions
|
@ -59,7 +59,7 @@ func pemBlockForKey(priv interface{}) *pem.Block {
|
||||||
case *ecdsa.PrivateKey:
|
case *ecdsa.PrivateKey:
|
||||||
b, err := x509.MarshalECPrivateKey(k)
|
b, err := x509.MarshalECPrivateKey(k)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal("unable to marshal ECDSA private key: %v", err)
|
log.Fatalf("Unable to marshal ECDSA private key: %v\n", err)
|
||||||
}
|
}
|
||||||
return &pem.Block{Type: "EC PRIVATE KEY", Bytes: b}
|
return &pem.Block{Type: "EC PRIVATE KEY", Bytes: b}
|
||||||
default:
|
default:
|
||||||
|
@ -153,7 +153,7 @@ func runCert(ctx *cli.Context) error {
|
||||||
|
|
||||||
keyOut, err := os.OpenFile("key.pem", os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600)
|
keyOut, err := os.OpenFile("key.pem", os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal("failed to open key.pem for writing: %v", err)
|
log.Fatalf("Failed to open key.pem for writing: %v\n", err)
|
||||||
}
|
}
|
||||||
pem.Encode(keyOut, pemBlockForKey(priv))
|
pem.Encode(keyOut, pemBlockForKey(priv))
|
||||||
keyOut.Close()
|
keyOut.Close()
|
||||||
|
|
|
@ -143,7 +143,7 @@ func (f *NewWebhookForm) Validate(ctx *macaron.Context, errs binding.Errors) bin
|
||||||
}
|
}
|
||||||
|
|
||||||
type NewSlackHookForm struct {
|
type NewSlackHookForm struct {
|
||||||
PayloadURL string `binding:"Required;Url`
|
PayloadURL string `binding:"Required;Url"`
|
||||||
Channel string `binding:"Required"`
|
Channel string `binding:"Required"`
|
||||||
Username string
|
Username string
|
||||||
IconURL string
|
IconURL string
|
||||||
|
|
Loading…
Reference in a new issue