mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-28 22:50:35 +03:00
all: Apply staticcheck recommendations
This commit is contained in:
parent
3011f36c27
commit
b5f39d23b8
41 changed files with 98 additions and 252 deletions
|
@ -62,7 +62,7 @@ func (b BaseURL) WithProtocol(protocol string) (string, error) {
|
|||
if isFullProtocol && u.Opaque != "" {
|
||||
u.Opaque = "//" + u.Opaque
|
||||
} else if isOpaqueProtocol && u.Opaque == "" {
|
||||
return "", fmt.Errorf("Cannot determine BaseURL for protocol %q", protocol)
|
||||
return "", fmt.Errorf("cannot determine BaseURL for protocol %q", protocol)
|
||||
}
|
||||
|
||||
return u.String(), nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue