diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-05-17 00:43:22 +0300 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-05-17 00:43:22 +0300 |
commit | aa53ba81c9fb2f3b8e8804be6bc897554912a294 (patch) | |
tree | be2075a610d54154ef5dc9e7b7157221054fbdec | |
parent | c9cf37ca53a4b6f212e2cf34fb2e8702bd6a94bc (diff) |
Make the GOOS settable, somehow
-rw-r--r-- | testmodBuilder/mods/mods.go | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/testmodBuilder/mods/mods.go b/testmodBuilder/mods/mods.go index 0016b8d..ec946e3 100644 --- a/testmodBuilder/mods/mods.go +++ b/testmodBuilder/mods/mods.go @@ -8,12 +8,21 @@ import ( ) const ( - basePath = "github.com/gohugoio/hugoTestModules1_" + runtime.GOOS - // Increment the minor version. versionTemplate = "v1.%d.0" ) +// TODO(bep) +func SetGOOS(s string) { + goos = s +} + +var goos string = runtime.GOOS + +func basePath() string { + return "github.com/gohugoio/hugoTestModules1_" + goos +} + type Md struct { name string Vendor bool @@ -63,7 +72,7 @@ func (m *Md) Name() string { } func (m *Md) Path() string { - return path.Join(basePath, m.Name()) + return path.Join(basePath(), m.Name()) } func (m *Md) init(idx int, parent *Md) { |