Call the json delimiter 'json_lead' instead of 'java_lead'

This commit is contained in:
Ask Bjørn Hansen 2014-02-16 01:20:46 -08:00 committed by spf13
parent 8ebb85f1f7
commit 1dbed5ee06

View file

@ -17,7 +17,7 @@ const (
TOML_LEAD = "+" TOML_LEAD = "+"
TOML_DELIM_UNIX = "+++\n" TOML_DELIM_UNIX = "+++\n"
TOML_DELIM_DOS = "+++\r\n" TOML_DELIM_DOS = "+++\r\n"
JAVA_LEAD = "{" JSON_LEAD = "{"
) )
var ( var (
@ -26,7 +26,7 @@ var (
[]byte(YAML_DELIM_DOS), []byte(YAML_DELIM_DOS),
[]byte(TOML_DELIM_UNIX), []byte(TOML_DELIM_UNIX),
[]byte(TOML_DELIM_DOS), []byte(TOML_DELIM_DOS),
[]byte(JAVA_LEAD), []byte(JSON_LEAD),
} }
unixEnding = []byte("\n") unixEnding = []byte("\n")
@ -161,7 +161,7 @@ func determineDelims(firstLine []byte) (left, right []byte) {
case 2: case 2:
fallthrough fallthrough
case 1: case 1:
return []byte(JAVA_LEAD), []byte("}") return []byte(JSON_LEAD), []byte("}")
default: default:
panic(fmt.Sprintf("Unable to determine delims from %q", firstLine)) panic(fmt.Sprintf("Unable to determine delims from %q", firstLine))
} }