mirror of
https://github.com/astaxie/beego.git
synced 2024-11-26 05:21:30 +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.EnableSidInHttpHeader {
|
||||||
if cf.SessionNameInHttpHeader == "" {
|
if cf.SessionNameInHttpHeader == "" {
|
||||||
err = errors.New("SessionNameInHttpHeader is empty")
|
panic(errors.New("SessionNameInHttpHeader is empty"))
|
||||||
panic(err)
|
|
||||||
return nil, err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
strMimeHeader := textproto.CanonicalMIMEHeaderKey(cf.SessionNameInHttpHeader)
|
strMimeHeader := textproto.CanonicalMIMEHeaderKey(cf.SessionNameInHttpHeader)
|
||||||
if cf.SessionNameInHttpHeader != strMimeHeader {
|
if cf.SessionNameInHttpHeader != strMimeHeader {
|
||||||
strErrMsg := "SessionNameInHttpHeader (" + cf.SessionNameInHttpHeader + ") has the wrong format, it should be like this : " + strMimeHeader
|
strErrMsg := "SessionNameInHttpHeader (" + cf.SessionNameInHttpHeader + ") has the wrong format, it should be like this : " + strMimeHeader
|
||||||
err = errors.New(strErrMsg)
|
panic(errors.New(strErrMsg))
|
||||||
panic(err)
|
|
||||||
return nil, err
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user