Skip to content

Commit ab31227

Browse files
committed
modules/vendor: Add modules support, update vendor to latest versions
Remove dep support, update vendor to latest versions, adjustements into Makefile, add athens public GOPROXY. Remove vendor folder. Fix crdb version. Add Athens to build target.
1 parent d656a42 commit ab31227

1,728 files changed

Lines changed: 377 additions & 702858 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Gopkg.lock

Lines changed: 0 additions & 617 deletions
This file was deleted.

Gopkg.toml

Lines changed: 0 additions & 20 deletions
This file was deleted.

Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,24 @@
33
APP = sqlfmt
44
SHELL := /bin/bash
55

6+
VERSION ?= v1.0.0
7+
OS ?= linux darwin windows
8+
GOPROXY ?= https://athens.azurefd.net
9+
10+
.PHONY: build
11+
build:
12+
@for app in $(APP) ; do \
13+
for os in $(OS) ; do \
14+
ext=""; \
15+
if [ "$$os" == "windows" ]; then \
16+
ext=".exe"; \
17+
fi; \
18+
GOPROXY=$(GOPROXY) GOOS=$$os GOARCH=amd64 CGO_ENABLED=0 \
19+
go build -o ./bin/$$app-$(VERSION)-$$os-amd64$$ext \
20+
./cmd/$$app; \
21+
done; \
22+
done
23+
624
.PHONY: sql-fmt
725
sql-fmt:
826
@echo "Running sql-fmt..."

README.md

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,11 @@ PostgreSQL and maybe other SQL should work good also.
66

77
## Installation
88

9-
sqlfmt uses internal codebase of [cockroachdb 2.1 release](https://github.com/cockroachdb/cockroach/tree/release-2.1) but decouples from the root project so you can use it in a handy way on command line and CI without having to install/build the entire cockroachdb project.
9+
sqlfmt uses internal codebase of [cockroachdb](https://github.com/cockroachdb/cockroach) but decouples from the root project so you can use it in a handy way on command line and CI without having to install/build the entire cockroachdb project.
1010

11-
Like cockroachdb 2.1 release, **sqlfmt requires go 1.10 or newer to work**.
11+
To use it as a system tool, you can just download the binary you can just [download the binary](https://github.com/lopezator/sqlfmt/releases).
1212

13-
Just execute the following command and you are good to go:
14-
15-
```sh
16-
$ go get github.com/lopezator/sqlfmt/...
17-
```
13+
If you want to include it in other GO project as a tool, you probably should use the [tools.go method](https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module).
1814

1915
## Usage
2016

@@ -122,14 +118,4 @@ Each release comes with pre-compiled binaries for several platforms:
122118
123119
https://github.com/lopezator/sqlfmt/releases
124120
125-
Anyway, if you want to compile your binaries from source, now, thanks to cockroachdb folks effort, sqlfmt is CGO free and compiling is easy as:
126-
127-
```
128-
$> GOOS=<GOOS> GOARCH=<GOARCH> go build cmd/sqlfmt/main.go
129-
```
130-
131-
Example:
132-
133-
```
134-
$> GOOS=linux GOARCH=amd64 go build cmd/sqlfmt/main.go
135-
```
121+
Anyway, if you want to compile your own binaries from source, you can just execute `make build`.

go.mod

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
module github.com/lopezator/sqlfmt
2+
3+
require (
4+
github.com/DataDog/zstd v1.3.5 // indirect
5+
github.com/Shopify/sarama v1.20.1 // indirect
6+
github.com/Shopify/toxiproxy v2.1.4+incompatible // indirect
7+
github.com/StackExchange/wmi v0.0.0-20181212234831-e0a55b97c705 // indirect
8+
github.com/VividCortex/ewma v1.1.1 // indirect
9+
github.com/andy-kimball/arenaskl v0.0.0-20171206050650-224761e552af // indirect
10+
github.com/apache/thrift v0.12.0 // indirect
11+
github.com/aws/aws-sdk-go v1.16.34 // indirect
12+
github.com/axiomhq/hyperloglog v0.0.0-20181223111420-4b99d0c2c99e // indirect
13+
github.com/biogo/store v0.0.0-20160505134755-913427a1d5e8 // indirect
14+
github.com/cenk/backoff v2.1.1+incompatible // indirect
15+
github.com/cenkalti/backoff v2.1.1+incompatible // indirect
16+
github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448 // indirect
17+
github.com/cockroachdb/apd v0.0.0-20181017181144-bced77f817b4 // indirect
18+
github.com/cockroachdb/circuitbreaker v2.2.1+incompatible // indirect
19+
github.com/cockroachdb/cmux v0.0.0-20170110192607-30d10be49292 // indirect
20+
github.com/cockroachdb/cockroach v2.2.0-alpha.20190211.0.20190220112258-1387b4fad485+incompatible
21+
github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c // indirect
22+
github.com/cockroachdb/ttycolor v0.0.0-20180709150743-a1d5aaeb377d // indirect
23+
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd // indirect
24+
github.com/coreos/etcd v3.3.12+incompatible // indirect
25+
github.com/dgryski/go-metro v0.0.0-20180109044635-280f6062b5bc // indirect
26+
github.com/dustin/go-humanize v1.0.0 // indirect
27+
github.com/eapache/go-resiliency v1.1.0 // indirect
28+
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect
29+
github.com/eapache/queue v1.1.0 // indirect
30+
github.com/elastic/gosigar v0.10.0 // indirect
31+
github.com/elazarl/go-bindata-assetfs v1.0.0 // indirect
32+
github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a // indirect
33+
github.com/getsentry/raven-go v0.2.0 // indirect
34+
github.com/go-logfmt/logfmt v0.4.0 // indirect
35+
github.com/go-ole/go-ole v1.2.2 // indirect
36+
github.com/go-sql-driver/mysql v1.4.1 // indirect
37+
github.com/gogo/protobuf v1.2.1-0.20181231100452-8e4a75f11384 // indirect
38+
github.com/golang/leveldb v0.0.0-20170107010102-259d9253d719 // indirect
39+
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db // indirect
40+
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c // indirect
41+
github.com/google/pprof v0.0.0-20190208070709-b421f19a5c07 // indirect
42+
github.com/grpc-ecosystem/grpc-gateway v1.7.0 // indirect
43+
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect
44+
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6 // indirect
45+
github.com/inconshreveable/mousetrap v1.0.0 // indirect
46+
github.com/jackc/fake v0.0.0-20150926172116-812a484cc733 // indirect
47+
github.com/jackc/pgx v3.3.0+incompatible // indirect
48+
github.com/knz/strtime v0.0.0-20181018220328-af2256ee352c // indirect
49+
github.com/kr/pretty v0.1.0 // indirect
50+
github.com/lib/pq v1.0.0 // indirect
51+
github.com/lightstep/lightstep-tracer-go v0.15.6 // indirect
52+
github.com/lufia/iostat v0.0.0-20170605150913-9f7362b77ad3 // indirect
53+
github.com/marusama/semaphore v0.0.0-20190110074507-6952cef993b2 // indirect
54+
github.com/mattn/go-runewidth v0.0.4 // indirect
55+
github.com/mitchellh/reflectwalk v1.0.0 // indirect
56+
github.com/montanaflynn/stats v0.5.0 // indirect
57+
github.com/olekukonko/tablewriter v0.0.1 // indirect
58+
github.com/onsi/ginkgo v1.7.0 // indirect
59+
github.com/onsi/gomega v1.4.3 // indirect
60+
github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492 // indirect
61+
github.com/opentracing/opentracing-go v1.0.2 // indirect
62+
github.com/openzipkin-contrib/zipkin-go-opentracing v0.3.5 // indirect
63+
github.com/peterbourgon/g2s v0.0.0-20170223122336-d4e7ad98afea // indirect
64+
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect
65+
github.com/pierrec/lz4 v2.0.5+incompatible // indirect
66+
github.com/pkg/errors v0.8.1
67+
github.com/prometheus/client_golang v0.9.2 // indirect
68+
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 // indirect
69+
github.com/prometheus/common v0.2.0 // indirect
70+
github.com/prometheus/procfs v0.0.0-20190209105433-f8d8b3f739bd // indirect
71+
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a // indirect
72+
github.com/sasha-s/go-deadlock v0.2.0 // indirect
73+
github.com/satori/go.uuid v1.2.0 // indirect
74+
github.com/shirou/gopsutil v2.18.12+incompatible // indirect
75+
github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4 // indirect
76+
github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24 // indirect
77+
github.com/spf13/cobra v0.0.3
78+
github.com/spf13/pflag v1.0.3 // indirect
79+
github.com/stretchr/testify v1.3.0 // indirect
80+
go.etcd.io/etcd v3.3.12+incompatible // indirect
81+
golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67 // indirect
82+
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd // indirect
83+
golang.org/x/sys v0.0.0-20190213121743-983097b1a8a3 // indirect
84+
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2 // indirect
85+
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c // indirect
86+
golang.org/x/tools v0.0.0-20190214163553-c161412db0d0 // indirect
87+
google.golang.org/appengine v1.4.0 // indirect
88+
google.golang.org/genproto v0.0.0-20190201180003-4b09977fb922 // indirect
89+
google.golang.org/grpc v1.18.0 // indirect
90+
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
91+
gopkg.in/yaml.v2 v2.2.2 // indirect
92+
)
93+
94+
replace github.com/cockroachdb/cockroach => github.com/cockroachdb/cockroach-gen v0.0.0-20190220115102-309c2f63c5ea

0 commit comments

Comments
 (0)