Skip to content

Commit 79abcab

Browse files
committed
refactor: clean project structure and dependencies
1 parent 41f48ce commit 79abcab

22 files changed

+116
-137
lines changed

Diff for: .dockerignore

+6
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

Diff for: .github/workflows/tests.yml

+1-1
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

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
docker-gen
2+
!cmd/docker-gen
23
dist
34
*.gz

Diff for: Makefile

+8-3
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

Diff for: cmd/docker-gen/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
"github.com/BurntSushi/toml"
1212
docker "github.com/fsouza/go-dockerclient"
13-
"github.com/jwilder/docker-gen"
13+
"github.com/nginx-proxy/docker-gen/internal/dockergen"
1414
)
1515

1616
type stringslice []string

Diff for: example.conf renamed to examples/example.conf

File renamed without changes.

Diff for: go.mod

+3-21
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
)

Diff for: go.sum

+96-111
Large diffs are not rendered by default.

Diff for: config.go renamed to internal/dockergen/config.go

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Diff for: utils.go renamed to internal/dockergen/utils.go

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)