chore: rename getQueryCache/getFormCache to initQueryCache/initFormCache (#2375)

This commit is contained in:
thinkerou
2020-05-14 11:35:14 +08:00
committed by GitHub
parent a6e8665e42
commit 1d5b9badd9
2 changed files with 12 additions and 13 deletions

View File

@ -90,13 +90,13 @@ func filterFlags(content string) string {
}
func chooseData(custom, wildcard interface{}) interface{} {
if custom == nil {
if wildcard == nil {
panic("negotiation config is invalid")
}
if custom != nil {
return custom
}
if wildcard != nil {
return wildcard
}
return custom
panic("negotiation config is invalid")
}
func parseAccept(acceptHeader string) []string {
@ -127,8 +127,7 @@ func joinPaths(absolutePath, relativePath string) string {
}
finalPath := path.Join(absolutePath, relativePath)
appendSlash := lastChar(relativePath) == '/' && lastChar(finalPath) != '/'
if appendSlash {
if lastChar(relativePath) == '/' && lastChar(finalPath) != '/' {
return finalPath + "/"
}
return finalPath