mirror of
https://github.com/yudai/gotty.git
synced 2026-01-22 01:06:10 +01:00
Handle hterm preferences with better care
This commit is contained in:
parent
86151f1ac9
commit
589ec6b50a
89 changed files with 1396 additions and 742 deletions
22
Godeps/_workspace/src/github.com/yudai/hcl/parse.go
generated
vendored
Normal file
22
Godeps/_workspace/src/github.com/yudai/hcl/parse.go
generated
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
package hcl
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/yudai/hcl/hcl"
|
||||
"github.com/yudai/hcl/json"
|
||||
)
|
||||
|
||||
// Parse parses the given input and returns the root object.
|
||||
//
|
||||
// The input format can be either HCL or JSON.
|
||||
func Parse(input string) (*hcl.Object, error) {
|
||||
switch lexMode(input) {
|
||||
case lexModeHcl:
|
||||
return hcl.Parse(input)
|
||||
case lexModeJson:
|
||||
return json.Parse(input)
|
||||
}
|
||||
|
||||
return nil, fmt.Errorf("unknown config format")
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue