Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/testmodBuilder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-05-17 00:43:22 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-05-17 00:43:22 +0300
commitaa53ba81c9fb2f3b8e8804be6bc897554912a294 (patch)
treebe2075a610d54154ef5dc9e7b7157221054fbdec
parentc9cf37ca53a4b6f212e2cf34fb2e8702bd6a94bc (diff)
Make the GOOS settable, somehow
-rw-r--r--testmodBuilder/mods/mods.go15
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) {