refactor(typo): fix typos (#1041)

This commit is contained in:
Kota Kanbe
2020-08-24 16:34:32 +09:00
committed by GitHub
parent a5b87af862
commit 58cf1f4c8e
14 changed files with 40 additions and 40 deletions

View File

@@ -15,7 +15,7 @@ import (
formatter "github.com/kotakanbe/logrus-prefixed-formatter"
)
// Log for localhsot
// Log for localhost
var Log *logrus.Entry
func init() {

View File

@@ -42,11 +42,11 @@ func AppendIfMissing(slice []string, s string) []string {
// URLPathJoin make URL
func URLPathJoin(baseURL string, paths ...string) (string, error) {
baseURL = strings.TrimSuffix(baseURL, "/")
trimedPaths := []string{}
trimmedPaths := []string{}
for _, path := range paths {
trimed := strings.Trim(path, " /")
if len(trimed) != 0 {
trimedPaths = append(trimedPaths, trimed)
trimmed := strings.Trim(path, " /")
if len(trimmed) != 0 {
trimmedPaths = append(trimmedPaths, trimmed)
}
}
var url *url.URL
@@ -54,7 +54,7 @@ func URLPathJoin(baseURL string, paths ...string) (string, error) {
if err != nil {
return "", err
}
url.Path += "/" + strings.Join(trimedPaths, "/")
url.Path += "/" + strings.Join(trimmedPaths, "/")
return url.String(), nil
}