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:
authorElliott Sales de Andrade <quantum.analyst@gmail.com>2020-02-23 07:34:13 +0300
committerElliott Sales de Andrade <quantum.analyst@gmail.com>2020-02-23 07:34:13 +0300
commiteff9f29415abf421a9d5374dc19c1f814076ef04 (patch)
treed4879755d10fd5eeb77557ec47f7679812e1d7b4
parent06a7ac215b613a5c7a0a8dc38a92eb534bddd02f (diff)
Remove use of osutil.Environ.
It only implements a replacement method, but the Environ is passed to os/exec.Cmd.Command, for which the last entry wins. Thus the replacement doesn't really save anything, and the github.com/shurcooL/go package is very large for packaging purposes.
-rw-r--r--build/go.mod1
-rw-r--r--build/go.sum2
-rw-r--r--build/main.go7
3 files changed, 3 insertions, 7 deletions
diff --git a/build/go.mod b/build/go.mod
index 6601cf9..09ab567 100644
--- a/build/go.mod
+++ b/build/go.mod
@@ -6,6 +6,5 @@ require (
github.com/gohugoio/hugo v0.56.0
github.com/gohugoio/testmodBuilder/mods v0.0.0-20190520184928-c56af20f2e95
github.com/pkg/errors v0.8.1
- github.com/shurcooL/go v0.0.0-20190330031554-6713ea532688
github.com/spf13/afero v1.2.2
)
diff --git a/build/go.sum b/build/go.sum
index 5824912..3549e77 100644
--- a/build/go.sum
+++ b/build/go.sum
@@ -292,8 +292,6 @@ github.com/sanity-io/litter v1.1.0/go.mod h1:CJ0VCw2q4qKU7LaQr3n7UOSHzgEMgcGco7N
github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
github.com/sevlyar/go-daemon v0.1.4/go.mod h1:6dJpPatBT9eUwM5VCw9Bt6CdX9Tk6UWvhW3MebLDRKE=
-github.com/shurcooL/go v0.0.0-20190330031554-6713ea532688 h1:p7kt1rmLjMUkAmuyY/GUZeCoOud+nq297UKCCgEqYmA=
-github.com/shurcooL/go v0.0.0-20190330031554-6713ea532688/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/skratchdot/open-golang v0.0.0-20190402232053-79abb63cd66e/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
diff --git a/build/main.go b/build/main.go
index 8c57d9d..cbe1f4e 100644
--- a/build/main.go
+++ b/build/main.go
@@ -16,7 +16,6 @@ import (
"github.com/gohugoio/hugo/modules"
testmods "github.com/gohugoio/testmodBuilder/mods"
"github.com/pkg/errors"
- "github.com/shurcooL/go/osutil"
"github.com/spf13/afero"
)
@@ -44,7 +43,7 @@ func main() {
b := &mb{
fs: fs,
mods: m.Collect(),
- environ: osutil.Environ(os.Environ()),
+ environ: os.Environ(),
}
b.cdir(dir)
@@ -63,11 +62,11 @@ type mb struct {
fs afero.Fs
mods []*testmods.Md
dir string
- environ osutil.Environ
+ environ []string
}
func (b *mb) cdir(dir string) {
- b.environ.Set("PWD", dir)
+ b.environ = append(b.environ, "PWD"+dir)
b.dir = dir
}