From e3d3d424b2e8e5a8c4ee847bfe77b6f160d45196 Mon Sep 17 00:00:00 2001
From: Unknwon <u@gogs.io>
Date: Sat, 16 Jul 2016 15:15:00 +0800
Subject: [PATCH] Minor fix for go vet

---
 cmd/cert.go               | 4 ++--
 modules/auth/repo_form.go | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/cmd/cert.go b/cmd/cert.go
index cd6972ea8..d0cdf38cd 100644
--- a/cmd/cert.go
+++ b/cmd/cert.go
@@ -59,7 +59,7 @@ func pemBlockForKey(priv interface{}) *pem.Block {
 	case *ecdsa.PrivateKey:
 		b, err := x509.MarshalECPrivateKey(k)
 		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}
 	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)
 	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))
 	keyOut.Close()
diff --git a/modules/auth/repo_form.go b/modules/auth/repo_form.go
index 13e53497d..e9ef2a236 100644
--- a/modules/auth/repo_form.go
+++ b/modules/auth/repo_form.go
@@ -143,7 +143,7 @@ func (f *NewWebhookForm) Validate(ctx *macaron.Context, errs binding.Errors) bin
 }
 
 type NewSlackHookForm struct {
-	PayloadURL string `binding:"Required;Url`
+	PayloadURL string `binding:"Required;Url"`
 	Channel    string `binding:"Required"`
 	Username   string
 	IconURL    string