Skip to content

Commit b8c203e

Browse files
committed
modules: use own cockroachdb-gen fork module aware version
now sqlfmt is installable via go install, and usable directly from modules
1 parent 79fc0ef commit b8c203e

4 files changed

Lines changed: 124 additions & 91 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
APP = sqlfmt
44
SHELL := /bin/bash
55

6-
VERSION ?= v1.0.0
6+
VERSION ?= v1.1.0
77
OS ?= linux darwin windows
88
GOPROXY ?= https://athens.azurefd.net
99

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,23 @@ PostgreSQL and maybe other SQL should work good also.
66

77
## Installation
88

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.
9+
sqlfmt uses internal codebase of [cockroachdb](https://github.com/cockroachdb/cockroach) but decouples from the root
10+
project so you can use it in a handy way on command line and CI without having to install/build the entire cockroachdb
11+
project.
1012

11-
To use it as a system tool, you can just [download the binary](https://github.com/lopezator/sqlfmt/releases).
13+
To use it as a system tool, you can just
14+
[download the precompiled binary for your platform](https://github.com/lopezator/sqlfmt/releases).
15+
16+
If you use go 1.12 or newer:
17+
18+
a) You can simply do:
19+
20+
```
21+
$> go install github.com/lopezator/cmd/sqlfmt
22+
```
23+
24+
b) Use the [tools.go method](https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module)
25+
which is the recommended way to install project tools in a module aware project.
1226

1327
## Usage
1428

go.mod

Lines changed: 4 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,12 @@
11
module github.com/lopezator/sqlfmt
22

3+
go 1.12
4+
35
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
206
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
7+
github.com/go-ole/go-ole v1.2.4 // indirect
668
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
779
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
9210
)
9311

94-
replace github.com/cockroachdb/cockroach => github.com/cockroachdb/cockroach-gen v0.0.0-20190220115102-309c2f63c5ea
12+
replace github.com/cockroachdb/cockroach => github.com/lopezator/cockroach v0.0.0-20190305125206-ee83b6ab8240

0 commit comments

Comments
 (0)