mirror of
https://github.com/astaxie/beego.git
synced 2024-12-22 22:00:49 +00:00
Go Vet
This commit is contained in:
parent
9e17f518b8
commit
245664010c
@ -132,17 +132,13 @@ func NewManager(provideName, config string) (*Manager, error) {
|
||||
|
||||
if cf.EnableSidInHttpHeader {
|
||||
if cf.SessionNameInHttpHeader == "" {
|
||||
err = errors.New("SessionNameInHttpHeader is empty")
|
||||
panic(err)
|
||||
return nil, err
|
||||
panic(errors.New("SessionNameInHttpHeader is empty"))
|
||||
}
|
||||
|
||||
strMimeHeader := textproto.CanonicalMIMEHeaderKey(cf.SessionNameInHttpHeader)
|
||||
if cf.SessionNameInHttpHeader != strMimeHeader {
|
||||
strErrMsg := "SessionNameInHttpHeader (" + cf.SessionNameInHttpHeader + ") has the wrong format, it should be like this : " + strMimeHeader
|
||||
err = errors.New(strErrMsg)
|
||||
panic(err)
|
||||
return nil, err
|
||||
panic(errors.New(strErrMsg))
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user