diff options
author | Unknwon <joe2010xtmf@163.com> | 2014-12-10 05:10:26 -0500 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2014-12-10 05:10:26 -0500 |
commit | 9ee80e3e5426821f03a4e99fad34418f5c736413 (patch) | |
tree | 9be9f017587159a4777c89c840933dbaccad3df6 | |
parent | b2c6a6920fbfed4bdd5bbb47c8c7906b44e983d0 (diff) | |
download | gitea-9ee80e3e5426821f03a4e99fad34418f5c736413.tar.gz gitea-9ee80e3e5426821f03a4e99fad34418f5c736413.zip |
fix compile error
-rw-r--r-- | gogs.go | 2 | ||||
-rw-r--r-- | modules/base/tool.go | 10 | ||||
-rw-r--r-- | templates/.VERSION | 2 |
3 files changed, 6 insertions, 8 deletions
@@ -17,7 +17,7 @@ import ( "github.com/gogits/gogs/modules/setting" ) -const APP_VER = "0.5.8.1209 Beta" +const APP_VER = "0.5.8.1210 Beta" func init() { runtime.GOMAXPROCS(runtime.NumCPU()) diff --git a/modules/base/tool.go b/modules/base/tool.go index 3c435fbdb1..ff5a4f4cd9 100644 --- a/modules/base/tool.go +++ b/modules/base/tool.go @@ -11,7 +11,6 @@ import ( "crypto/sha1" "encoding/base64" "encoding/hex" - "errors" "fmt" "hash" "html/template" @@ -41,15 +40,14 @@ func EncodeSha1(str string) string { return hex.EncodeToString(h.Sum(nil)) } -func BasicAuthDecode(encoded string) (user string, name string, err error) { - var s []byte - s, err = base64.StdEncoding.DecodeString(encoded) +func BasicAuthDecode(encoded string) (string, string, error) { + s, err := base64.StdEncoding.DecodeString(encoded) if err != nil { - return user, name, err + return "", "", err } auth := strings.SplitN(string(s), ":", 2) - return auth[0], auth[1], err + return auth[0], auth[1], nil } func BasicAuthEncode(username, password string) string { diff --git a/templates/.VERSION b/templates/.VERSION index f7e9d476cc..e5200d1825 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.5.8.1209 Beta
\ No newline at end of file +0.5.8.1210 Beta
\ No newline at end of file |