From d3d692adf6698b00b3c36d6aba27265ecdc79b49 Mon Sep 17 00:00:00 2001 From: Softonik Date: Mon, 4 Oct 2021 01:42:19 +0300 Subject: [PATCH] =?UTF-8?q?Magefile=20=D0=B8=20go.mod=20=D0=BE=D0=B1=D0=BD?= =?UTF-8?q?=D0=BE=D0=B2=D0=BB=D0=B5=D0=BD=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Magefile.go | 23 +++++------------------ go.mod | 17 +++++++++++++++++ 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/Magefile.go b/Magefile.go index 8bff609..90e39f2 100644 --- a/Magefile.go +++ b/Magefile.go @@ -22,7 +22,7 @@ func init() { BuildFn = build } -func Imports() { +func GetLibs() { Bash(`sudo docker run -ti --rm \ -h host \ --net=bridge \ @@ -46,19 +46,6 @@ func Imports() { github.com/onsi/ginkgo/ginkgo \ github.com/onsi/gomega/... \ github.com/davecgh/go-spew \ - github.com/h12w/go-socks5 \ - h12.io/socks \ - github.com/vishvananda/netns \ - github.com/milosgajdos/tenus \ - github.com/docker/libcontainer/netlink \ - github.com/go-ping/ping \ - github.com/sirupsen/logrus \ - github.com/songgao/water \ - github.com/aerogo/packet \ - github.com/undefinedlabs/go-mpatch \ - github.com/buger/goreplay \ - github.com/google/gopacket \ - && go list -m -json ... >/dev/null '`) } @@ -69,7 +56,7 @@ func ModTidy() { -v /etc/localtime:/etc/localtime:ro \ -v ` + GolangVolume + `:/usr/local/go:ro \ \ - -v /d1/d/gopath/_data:/gopath:rw \ + -v /gopath:/gopath:rw \ -v ${PWD}:/app \ \ -e GOPATH=/gopath \ @@ -83,7 +70,7 @@ func ModTidy() { \ ` + ImageName + " " + `mod tidy`) - Imports() + GetLibs() } func Test() { @@ -105,10 +92,10 @@ func TestLib() { -w /app/transpile \ -u 0 \ \ - --entrypoint=/usr/local/go/bin/go \ + --entrypoint=/gopath/bin/ginkgo \ \ ` + ImageName + " " + - `test -gcflags=-l`) + `-gcflags=-l`) } func build() { diff --git a/go.mod b/go.mod index 4349e35..c5c27a0 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,20 @@ module my/go-translator go 1.17 + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/fsnotify/fsnotify v1.4.9 // indirect + github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/nxadm/tail v1.4.8 // indirect + github.com/onsi/ginkgo v1.16.4 // indirect + github.com/onsi/gomega v1.16.0 // indirect + golang.org/x/net v0.0.0-20210428140749-89ef3d95e781 // indirect + golang.org/x/sys v0.0.0-20210423082822-04245dca01da // indirect + golang.org/x/text v0.3.6 // indirect + golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e // indirect + google.golang.org/protobuf v1.26.0 // indirect + gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect +)