From ad2b0be8d119ba31185f88a9bf112edc3fd77e93 Mon Sep 17 00:00:00 2001 From: danieljankowski <daniel.jankowski@rub.de> Date: Mon, 18 Mar 2019 09:29:52 +0100 Subject: [PATCH] Meta: from dep to go mod --- .gitlab-ci.yml | 13 ++++--------- Gopkg.lock | 33 --------------------------------- Gopkg.toml | 34 ---------------------------------- go.mod | 8 ++++++++ go.sum | 8 ++++++++ matrix.go | 2 +- 6 files changed, 21 insertions(+), 77 deletions(-) delete mode 100644 Gopkg.lock delete mode 100644 Gopkg.toml create mode 100644 go.mod create mode 100644 go.sum diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 75576ae..b834c8a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,7 @@ image: docker:stable variables: DOCKER_DRIVER: overlay2 GIT_STRATEGY: clone + GO111MODULE: "on" services: - golang @@ -17,12 +18,10 @@ test: - mkdir -p /go/src/git.noc.ruhr-uni-bochum.de/danieljankowski/gomatrix # copy everything into the right place - cp -R $CI_PROJECT_DIR/* /go/src/git.noc.ruhr-uni-bochum.de/danieljankowski/gomatrix/. - # install the dep - - go get -u github.com/golang/dep/cmd/dep # change directory into the go package and prepare the tests - cd /go/src/git.noc.ruhr-uni-bochum.de/danieljankowski/gomatrix # install the dependencies - - dep ensure + - go mod vendor - mkdir report/ # run the tests with coverage report - go test -count=1 -coverprofile report/cover.out -covermode=count ./... @@ -44,12 +43,10 @@ lint: - mkdir -p /go/src/git.noc.ruhr-uni-bochum.de/danieljankowski/gomatrix # copy everything into the right place - cp -R $CI_PROJECT_DIR/* /go/src/git.noc.ruhr-uni-bochum.de/danieljankowski/gomatrix/. - # install the dep - - go get -u github.com/golang/dep/cmd/dep # change directory into the go package and prepare the tests - cd /go/src/git.noc.ruhr-uni-bochum.de/danieljankowski/gomatrix # install the dependencies - - dep ensure + - go mod vendor - mkdir report/ # install golint - go get -u golang.org/x/lint/golint @@ -70,12 +67,10 @@ memory-sanitizer: - mkdir -p /go/src/git.noc.ruhr-uni-bochum.de/danieljankowski/gomatrix # copy everything into the right place - cp -R $CI_PROJECT_DIR/* /go/src/git.noc.ruhr-uni-bochum.de/danieljankowski/gomatrix/. - # install the dep - - go get -u github.com/golang/dep/cmd/dep # change directory into the go package and prepare the tests - cd /go/src/git.noc.ruhr-uni-bochum.de/danieljankowski/gomatrix # install the dependencies - - dep ensure + - go mod vendor - mkdir report/ # run the tests with coverage report - CC=clang go test -count=1 -msan -short $(go list ./... | grep -v /vendor/) \ No newline at end of file diff --git a/Gopkg.lock b/Gopkg.lock deleted file mode 100644 index 316f347..0000000 --- a/Gopkg.lock +++ /dev/null @@ -1,33 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - digest = "1:ffe9824d294da03b391f44e1ae8281281b4afc1bdaa9588c9097785e3af10cec" - name = "github.com/davecgh/go-spew" - packages = ["spew"] - pruneopts = "UT" - revision = "8991bc29aa16c548c550c7ff78260e27b9ab7c73" - version = "v1.1.1" - -[[projects]] - digest = "1:0028cb19b2e4c3112225cd871870f2d9cf49b9b4276531f03438a88e94be86fe" - name = "github.com/pmezard/go-difflib" - packages = ["difflib"] - pruneopts = "UT" - revision = "792786c7400a136282c1664665ae0a8db921c6c2" - version = "v1.0.0" - -[[projects]] - digest = "1:972c2427413d41a1e06ca4897e8528e5a1622894050e2f527b38ddf0f343f759" - name = "github.com/stretchr/testify" - packages = ["assert"] - pruneopts = "UT" - revision = "ffdc059bfe9ce6a4e144ba849dbedead332c6053" - version = "v1.3.0" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - input-imports = ["github.com/stretchr/testify/assert"] - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml deleted file mode 100644 index b9a4fc4..0000000 --- a/Gopkg.toml +++ /dev/null @@ -1,34 +0,0 @@ -# Gopkg.toml example -# -# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html -# for detailed Gopkg.toml documentation. -# -# required = ["github.com/user/thing/cmd/thing"] -# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] -# -# [[constraint]] -# name = "github.com/user/project" -# version = "1.0.0" -# -# [[constraint]] -# name = "github.com/user/project2" -# branch = "dev" -# source = "github.com/myfork/project2" -# -# [[override]] -# name = "github.com/x/y" -# version = "2.4.0" -# -# [prune] -# non-go = false -# go-tests = true -# unused-packages = true - - -[[constraint]] - name = "github.com/stretchr/testify" - version = "1.3.0" - -[prune] - go-tests = true - unused-packages = true diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..8b6d049 --- /dev/null +++ b/go.mod @@ -0,0 +1,8 @@ +module git.noc.ruhr-uni-bochum.de/danieljankowski/gomatrix + +go 1.12 + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/stretchr/testify v1.3.0 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..4f89841 --- /dev/null +++ b/go.sum @@ -0,0 +1,8 @@ +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= diff --git a/matrix.go b/matrix.go index 5583123..5f1965e 100644 --- a/matrix.go +++ b/matrix.go @@ -287,7 +287,7 @@ func (f *F2) SwapCols(i, j int) error { // @return *F2 func (f *F2) PermuteCols() *F2 { // initialize the permuation matrix - permutationMatrix := NewF2(f.N, f.M) + permutationMatrix := NewF2(f.M, f.M) // set the permutation matrix to the identity matrix of f permutationMatrix.SetToIdentity() -- GitLab