NewJSONConfigParser returns a jsonconfig.ConfigParser with its IncludeDirs set with PerkeepConfigDir and the contents of CAMLI_INCLUDE_PATH.
()
| 342 | // NewJSONConfigParser returns a jsonconfig.ConfigParser with its IncludeDirs |
| 343 | // set with PerkeepConfigDir and the contents of CAMLI_INCLUDE_PATH. |
| 344 | func NewJSONConfigParser() *jsonconfig.ConfigParser { |
| 345 | var cp jsonconfig.ConfigParser |
| 346 | dir, err := PerkeepConfigDir() |
| 347 | if err != nil { |
| 348 | log.Fatalf("NewJSONConfigParser error: %v", err) |
| 349 | } |
| 350 | cp.IncludeDirs = append([]string{dir}, filepath.SplitList(os.Getenv("CAMLI_INCLUDE_PATH"))...) |
| 351 | return &cp |
| 352 | } |
| 353 | |
| 354 | // PkSourceRoot returns the root of the source tree, or an error. |
| 355 | func PkSourceRoot() (string, error) { |