Closed ghost closed 9 years ago
I like the idea of this and I think espresso looks nice
The good thing about using YAML is that their is not much effort in using it
I'm working on the task runner now. I have decided to replace go-yaml by go-gypsy. It is not fully compatable with the 1.2 (or even 1.1) standard but it meets the requirements I've mentioned above and provides the features we need.
I'm also thinking about replacement of the current format:
init:
- go build ./
- /start xxx
- /single zzz
- /echo "smth"
xxx:
- go test ./
zzz: ./bin/run
By the following one:
init:
- run: "go build ./"
- exec: xxx
- exec: zzz
- echo: "smth"
cmds:
xxx:
- {run: "go test ./", async: true}
zzz:
- single: "./bin/run"
I.e. YAML syntax is used instead of custom /cmdName
constructions. @DavidHunter what do you think about the change? IMO it decreases readability of the configuration file (though I expected the opposite).
I think the current one is easier to read
I've only slightly changed the format for consistency of /single
with /run
and /start
, and replaced go-yaml by go-gypsy (#33). I'm closing this issue, we'll reopen it if a better format / parser is found.
Goal's
run
tool uses YAML for its configuration file. The file is described here. However, I'd like to replace it by something else. I want all code including dependencies to meet the following requirements (apart from the general quality of the library):gofmt
-ed with-s
flag;golint
-edgo vet
. go-yaml doesn't meet those requirements and that is the only Go implementation of YAML that is active and maintained.I have played with different formats. Not sure about XML. But JSON doesn't work, comments are not supported and the whole config looks very difficult to read and understand with all those
"
,,
, and{}
that could be omitted. It is also possible to use a custom format. Here is one I have developed right for this use-case.