Skip to content

Commit

Permalink
Build: Fix potential case-insensitive import collision for github.com…
Browse files Browse the repository at this point in the history
…/Unknwon/com (#18915)

* update gopkg.in/macaron.v1

* update github.com/go-macaron/binding

* update github.com/go-macaron/session

* Substitute github.com/Unknwon/com with github.com/unknwon/com

* Clean up modules using `go mod tidy`

* Substitute github.com/Unknwon/bra with github.com/unknwon/bra
  • Loading branch information
papagian authored Sep 9, 2019
1 parent 62a808b commit de075e5
Show file tree
Hide file tree
Showing 61 changed files with 424 additions and 113 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ scripts/go/bin/gosec: scripts/go/go.mod

scripts/go/bin/bra: scripts/go/go.mod
@cd scripts/go; \
$(GO) build -o ./bin/bra github.com/Unknwon/bra
$(GO) build -o ./bin/bra github.com/unknwon/bra

scripts/go/bin/golangci-lint: scripts/go/go.mod
@cd scripts/go; \
Expand Down
4 changes: 2 additions & 2 deletions docs/sources/project/building_from_source.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ does this.
If you using *nix machine, you can just use the `make run` command, otherwise you need install `bra` binary first:

```bash
go get github.com/Unknwon/bra
go get github.com/unknwon/bra

bra run
```
Expand Down Expand Up @@ -143,7 +143,7 @@ Please contribute to the Grafana project and submit a pull request! Build new fe

**Problem**: When executing a `go get` command on Windows and you get an error about the git repository not existing.

**Solution**: `go get` requires Git. If you run `go get` without Git then it will create an empty directory in your Go workspace for the library you are trying to get. Even after installing Git, you will get a similar error. To fix this, delete the empty directory (for example: if you tried to run `go get github.com/Unknwon/bra` then delete `%USERPROFILE%\go\src\github.com\Unknwon\bra`) and run the `go get` command again.
**Solution**: `go get` requires Git. If you run `go get` without Git then it will create an empty directory in your Go workspace for the library you are trying to get. Even after installing Git, you will get a similar error. To fix this, delete the empty directory (for example: if you tried to run `go get github.com/unknwon/bra` then delete `%USERPROFILE%\go\src\github.com\unknwon\bra`) and run the `go get` command again.
<br><br>

**Problem**: On Windows, getting errors about a tool not being installed even though you just installed that tool.
Expand Down
28 changes: 10 additions & 18 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ go 1.12

require (
github.com/BurntSushi/toml v0.3.1
github.com/Unknwon/com v0.0.0-20190214221849-2d12a219ccaf
github.com/VividCortex/mysqlerr v0.0.0-20170204212430-6c6b55f8796f
github.com/aws/aws-sdk-go v1.18.5
github.com/beevik/etree v1.1.0 // indirect
github.com/benbjohnson/clock v0.0.0-20161215174838-7dc76406b6d3
github.com/bradfitz/gomemcache v0.0.0-20180710155616-bc664df96737
github.com/bradfitz/gomemcache v0.0.0-20190329173943-551aad21a668
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd // indirect
github.com/codegangsta/cli v1.20.0
github.com/crewjam/saml v0.0.0-20190521120225-344d075952c9
Expand All @@ -22,17 +21,15 @@ require (
github.com/facebookgo/structtag v0.0.0-20150214074306-217e25fb9691 // indirect
github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 // indirect
github.com/fatih/color v1.7.0
github.com/go-macaron/binding v0.0.0-20170611065819-ac54ee249c27
github.com/go-macaron/binding v0.0.0-20190806013118-0b4f37bab25b
github.com/go-macaron/gzip v0.0.0-20160222043647-cad1c6580a07
github.com/go-macaron/inject v0.0.0-20160627170012-d8a0b8677191 // indirect
github.com/go-macaron/session v0.0.0-20190131233854-0a0a789bf193
github.com/go-macaron/session v0.0.0-20190805070824-1a3cdc6f5659
github.com/go-sql-driver/mysql v1.4.1
github.com/go-stack/stack v1.8.0
github.com/go-xorm/core v0.6.2
github.com/go-xorm/xorm v0.7.1
github.com/gobwas/glob v0.2.3
github.com/google/go-cmp v0.2.0 // indirect
github.com/gopherjs/gopherjs v0.0.0-20190411002643-bd77b112433e // indirect
github.com/gorilla/websocket v1.4.0
github.com/gosimple/slug v1.4.2
github.com/grafana/grafana-plugin-model v0.0.0-20180518082423-84176c64269d
Expand All @@ -49,12 +46,9 @@ require (
github.com/lib/pq v1.2.0
github.com/mattn/go-colorable v0.1.1 // indirect
github.com/mattn/go-isatty v0.0.7
github.com/mattn/go-sqlite3 v1.10.0
github.com/onsi/ginkgo v1.8.0 // indirect
github.com/onsi/gomega v1.5.0 // indirect
github.com/mattn/go-sqlite3 v1.11.0
github.com/opentracing/opentracing-go v1.1.0
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/pkg/errors v0.8.1 // indirect
github.com/prometheus/client_golang v0.9.2
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90
github.com/prometheus/common v0.2.0
Expand All @@ -63,29 +57,27 @@ require (
github.com/robfig/cron/v3 v3.0.0
github.com/russellhaering/goxmldsig v0.0.0-20180430223755-7acd5e4a6ef7 // indirect
github.com/sergi/go-diff v1.0.0 // indirect
github.com/smartystreets/assertions v0.0.0-20190401211740-f487f9de1cd3 // indirect
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a
github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337
github.com/stretchr/testify v1.3.0
github.com/teris-io/shortid v0.0.0-20171029131806-771a37caa5cf
github.com/ua-parser/uap-go v0.0.0-20190826212731-daf92ba38329
github.com/uber-go/atomic v1.3.2 // indirect
github.com/uber/jaeger-client-go v2.16.0+incompatible
github.com/uber/jaeger-lib v2.0.0+incompatible // indirect
github.com/unknwon/com v1.0.1
github.com/yudai/gojsondiff v1.0.0
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect
github.com/yudai/pp v2.0.1+incompatible // indirect
go.uber.org/atomic v1.3.2 // indirect
golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a // indirect
golang.org/x/net v0.0.0-20190415100556-4a65cf94b679
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80
golang.org/x/oauth2 v0.0.0-20190319182350-c85d3e98c914
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6
golang.org/x/sys v0.0.0-20190415081028-16da32be82c5 // indirect
golang.org/x/sync v0.0.0-20190423024810-112230192c58
golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect
gopkg.in/ini.v1 v1.42.0
gopkg.in/ini.v1 v1.46.0
gopkg.in/ldap.v3 v3.0.2
gopkg.in/macaron.v1 v1.3.2
gopkg.in/macaron.v1 v1.3.4
gopkg.in/mail.v2 v2.3.1
gopkg.in/redis.v5 v5.2.9
gopkg.in/square/go-jose.v2 v2.3.0
Expand Down
Loading

0 comments on commit de075e5

Please sign in to comment.