Skip to content

Commit 2d078b1

Browse files
authored
Merge pull request #362 from nginx-proxy/restructure
Re-organize the project structure, change the name and clean the dependencies.
2 parents 24bf161 + aa2a909 commit 2d078b1

22 files changed

+210
-246
lines changed

.dockerignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
.git
2+
.github
23
docker-gen
34
dist
5+
examples
6+
LICENSE
7+
Makefile
8+
README.md
9+
templates
410
*.gz

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ jobs:
3232
run: make check-gofmt
3333

3434
- name: Run tests
35-
run: go test -v
35+
run: go test -v ./internal/dockergen

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
docker-gen
2+
!cmd/docker-gen
23
dist
34
*.gz

Makefile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,16 @@ get-deps:
4444
go mod download
4545

4646
check-gofmt:
47-
if [ -n "$(shell gofmt -l .)" ]; then \
47+
if [ -n "$(shell gofmt -l ./cmd/docker-gen)" ]; then \
4848
echo 1>&2 'The following files need to be formatted:'; \
49-
gofmt -l .; \
49+
gofmt -l ./cmd/docker-gen; \
50+
exit 1; \
51+
fi
52+
if [ -n "$(shell gofmt -l ./internal/dockergen)" ]; then \
53+
echo 1>&2 'The following files need to be formatted:'; \
54+
gofmt -l ./internal/dockergen; \
5055
exit 1; \
5156
fi
5257

5358
test:
54-
go test
59+
go test ./internal/dockergen

cmd/docker-gen/main.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ import (
66
"log"
77
"os"
88
"path/filepath"
9-
"sync"
109

1110
"github.com/BurntSushi/toml"
1211
docker "github.com/fsouza/go-dockerclient"
13-
"github.com/jwilder/docker-gen"
12+
"github.com/nginx-proxy/docker-gen/internal/dockergen"
1413
)
1514

1615
type stringslice []string
@@ -36,8 +35,6 @@ var (
3635
tlsKey string
3736
tlsCaCert string
3837
tlsVerify bool
39-
tlsCertPath string
40-
wg sync.WaitGroup
4138
)
4239

4340
func (strings *stringslice) String() string {
@@ -69,7 +66,7 @@ Environment Variables:
6966
DOCKER_CERT_PATH - directory path containing key.pem, cert.pem and ca.pem
7067
DOCKER_TLS_VERIFY - enable client TLS verification
7168
`)
72-
println(`For more information, see https://github.com/jwilder/docker-gen`)
69+
println(`For more information, see https://github.com/nginx-proxy/docker-gen`)
7370
}
7471

7572
func loadConfig(file string) error {
File renamed without changes.

go.mod

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,9 @@
1-
module github.com/jwilder/docker-gen
1+
module github.com/nginx-proxy/docker-gen
22

3-
go 1.11
3+
go 1.16
44

55
require (
6-
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
76
github.com/BurntSushi/toml v0.3.1
8-
github.com/Microsoft/go-winio v0.4.16 // indirect
9-
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect
10-
github.com/containerd/continuity v0.0.0-20210315143101-93e15499afd5 // indirect
11-
github.com/docker/docker v1.4.2-0.20171014114940-f2afa2623594 // indirect
12-
github.com/docker/go-connections v0.4.0 // indirect
13-
github.com/docker/go-units v0.3.2 // indirect
14-
github.com/fsouza/go-dockerclient v0.0.0-20171009031830-d2a6d0596004
15-
github.com/gogo/protobuf v1.3.2 // indirect
16-
github.com/google/go-cmp v0.5.5 // indirect
17-
github.com/gorilla/context v1.1.1 // indirect
18-
github.com/gorilla/mux v0.0.0-20160718151158-d391bea3118c // indirect
19-
github.com/gotestyourself/gotestyourself v2.2.0+incompatible // indirect
20-
github.com/opencontainers/image-spec v1.0.1 // indirect
21-
github.com/opencontainers/runc v0.1.1 // indirect
22-
github.com/opencontainers/selinux v1.8.0 // indirect
23-
github.com/sirupsen/logrus v1.8.1 // indirect
7+
github.com/fsouza/go-dockerclient v1.7.2
248
github.com/stretchr/testify v1.7.0
25-
golang.org/x/sys v0.0.0-20210331175145-43e1dd70ce54 // indirect
26-
gotest.tools v2.2.0+incompatible // indirect
279
)

go.sum

Lines changed: 96 additions & 111 deletions
Large diffs are not rendered by default.

config.go renamed to internal/dockergen/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func ParseWait(s string) (*Wait, error) {
7373
return nil, err
7474
}
7575
if max < min {
76-
return nil, errors.New("Invalid wait interval: max must be larger than min")
76+
return nil, errors.New("invalid wait interval: max must be larger than min")
7777
}
7878
} else {
7979
max = 4 * min
File renamed without changes.

0 commit comments

Comments
 (0)