export keyword parsing

This commit is contained in:
John Barton (joho)
2013-07-30 18:38:10 +10:00
parent 4a2748eb3c
commit 37c8b8e487
2 changed files with 8 additions and 1 deletions

View File

@ -70,7 +70,11 @@ func parseLine(line string) (key string, value string, err error) {
return
}
key = strings.Trim(splitString[0], " ")
key = splitString[0]
if strings.HasPrefix(key, "export") {
key = strings.TrimPrefix(key, "export")
}
key = strings.Trim(key, " ")
value = strings.Trim(splitString[1], " \"'")
value = strings.Replace(value, "\\\"", "\"", -1)