diff options
-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) { |