Handle hterm preferences with better care

This commit is contained in:
Iwasaki Yudai 2015-10-12 10:24:46 +09:00
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
View 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")
}