summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorDan Duvall <dduvall@wikimedia.org>2017-05-01 10:45:00 -0700
committerDan Duvall <dduvall@wikimedia.org>2017-05-01 10:45:00 -0700
commitd0ada7682fa323c52940c99113a8809aecfae06b (patch)
tree1941e58214e705a08df8fee88d1537aab26507ef /config
parent72a866a74aade72fd9b22a6f364a68193087e8f3 (diff)
downloadblubber-d0ada7682fa323c52940c99113a8809aecfae06b.tar.gz
Rename `run` config to `runs`
It sounds more declarative.
Diffstat (limited to 'config')
-rw-r--r--config/common.go4
-rw-r--r--config/runs.go (renamed from config/run.go)8
2 files changed, 6 insertions, 6 deletions
diff --git a/config/common.go b/config/common.go
index 36ebc01..c4dc2db 100644
--- a/config/common.go
+++ b/config/common.go
@@ -4,7 +4,7 @@ type CommonConfig struct {
Base string `yaml:"base"`
Apt AptConfig `yaml:"apt"`
Npm NpmConfig `yaml:"npm"`
- Run RunConfig `yaml:"run"`
+ Runs RunsConfig `yaml:"runs"`
SharedVolume bool `yaml:"sharedvolume"`
EntryPoint []string `yaml:"entrypoint"`
}
@@ -16,7 +16,7 @@ func (cc1 *CommonConfig) Merge(cc2 CommonConfig) {
cc1.Apt.Merge(cc2.Apt)
cc1.Npm.Merge(cc2.Npm)
- cc1.Run.Merge(cc2.Run)
+ cc1.Runs.Merge(cc2.Runs)
cc1.SharedVolume = cc1.SharedVolume || cc2.SharedVolume
diff --git a/config/run.go b/config/runs.go
index 410eca6..70f03a9 100644
--- a/config/run.go
+++ b/config/runs.go
@@ -5,21 +5,21 @@ import (
"strings"
)
-type RunConfig struct {
+type RunsConfig struct {
In string `yaml:"in"`
As string `yaml:"as"`
Uid int `yaml:"uid"`
- Gid int `yaml:"uid"`
+ Gid int `yaml:"gid"`
}
-func (run *RunConfig) Merge(run2 RunConfig) {
+func (run *RunsConfig) Merge(run2 RunsConfig) {
if run2.In != "" { run.In = run2.In }
if run2.As != "" { run.As = run2.As }
if run2.Uid != 0 { run.Uid = run2.Uid }
if run2.Gid != 0 { run.Gid = run2.Gid }
}
-func (run RunConfig) Commands() []string {
+func (run RunsConfig) Commands() []string {
cmds := []string{}
if run.In != "" {