forked from coop-cloud-mirrors/godotenv
Fix up some lint/staticcheck recommendations
This commit is contained in:
@ -250,15 +250,15 @@ func parseLine(line string, envMap map[string]string) (key string, value string,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if len(splitString) != 2 {
|
if len(splitString) != 2 {
|
||||||
err = errors.New("Can't separate key from value")
|
err = errors.New("can't separate key from value")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse the key
|
// Parse the key
|
||||||
key = splitString[0]
|
key = splitString[0]
|
||||||
if strings.HasPrefix(key, "export") {
|
|
||||||
key = strings.TrimPrefix(key, "export")
|
key = strings.TrimPrefix(key, "export")
|
||||||
}
|
|
||||||
key = strings.TrimSpace(key)
|
key = strings.TrimSpace(key)
|
||||||
|
|
||||||
key = exportRegex.ReplaceAllString(splitString[0], "$1")
|
key = exportRegex.ReplaceAllString(splitString[0], "$1")
|
||||||
|
Reference in New Issue
Block a user