Switch from Godep to go vendoring
This commit is contained in:
parent
6b37713bc0
commit
cd317761c5
1504 changed files with 263076 additions and 34441 deletions
31
vendor/github.com/hashicorp/hcl/lex.go
generated
vendored
Normal file
31
vendor/github.com/hashicorp/hcl/lex.go
generated
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
package hcl
|
||||
|
||||
import (
|
||||
"unicode"
|
||||
)
|
||||
|
||||
type lexModeValue byte
|
||||
|
||||
const (
|
||||
lexModeUnknown lexModeValue = iota
|
||||
lexModeHcl
|
||||
lexModeJson
|
||||
)
|
||||
|
||||
// lexMode returns whether we're going to be parsing in JSON
|
||||
// mode or HCL mode.
|
||||
func lexMode(v string) lexModeValue {
|
||||
for _, r := range v {
|
||||
if unicode.IsSpace(r) {
|
||||
continue
|
||||
}
|
||||
|
||||
if r == '{' {
|
||||
return lexModeJson
|
||||
} else {
|
||||
return lexModeHcl
|
||||
}
|
||||
}
|
||||
|
||||
return lexModeHcl
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue