From ae1285dc66f6a608519d1ae31a73d9caa500990a Mon Sep 17 00:00:00 2001 From: Hector Date: Mon, 19 Jun 2023 17:58:16 +0000 Subject: [PATCH] chore: move source code to root folder --- Makefile | 10 +++++----- {src/auth => auth}/hash.go | 0 {src/auth => auth}/hash_test.go | 0 {src/auth => auth}/middleware.go | 0 {src/auth => auth}/middleware_test.go | 0 {src/cfg => cfg}/basicAuth.go | 0 {src/cfg => cfg}/basicAuth_test.go | 0 {src/cfg => cfg}/cfg.go | 0 {src/collector => collector}/f2b/collector.go | 0 {src/collector => collector}/f2b/socket.go | 0 {src/collector => collector}/textfile/collector.go | 0 {src/collector => collector}/textfile/file.go | 0 {src/collector => collector}/textfile/writer.go | 0 src/exporter.go => exporter.go | 0 src/go.mod => go.mod | 0 src/go.sum => go.sum | 0 {src/socket => socket}/decoder.go | 0 {src/socket => socket}/fail2banSocket.go | 0 {src/socket => socket}/protocol.go | 0 19 files changed, 5 insertions(+), 5 deletions(-) rename {src/auth => auth}/hash.go (100%) rename {src/auth => auth}/hash_test.go (100%) rename {src/auth => auth}/middleware.go (100%) rename {src/auth => auth}/middleware_test.go (100%) rename {src/cfg => cfg}/basicAuth.go (100%) rename {src/cfg => cfg}/basicAuth_test.go (100%) rename {src/cfg => cfg}/cfg.go (100%) rename {src/collector => collector}/f2b/collector.go (100%) rename {src/collector => collector}/f2b/socket.go (100%) rename {src/collector => collector}/textfile/collector.go (100%) rename {src/collector => collector}/textfile/file.go (100%) rename {src/collector => collector}/textfile/writer.go (100%) rename src/exporter.go => exporter.go (100%) rename src/go.mod => go.mod (100%) rename src/go.sum => go.sum (100%) rename {src/socket => socket}/decoder.go (100%) rename {src/socket => socket}/fail2banSocket.go (100%) rename {src/socket => socket}/protocol.go (100%) diff --git a/Makefile b/Makefile index c975a49..12434b7 100644 --- a/Makefile +++ b/Makefile @@ -1,23 +1,23 @@ go/dependencies: - cd src/ && go mod download + go mod download # Make sure no unnecessary dependencies are present go/checkDependencies: - cd src/ && go mod tidy -v + go mod tidy -v git diff-index --quiet HEAD # Standard go test go/test: - cd src/ && go test ./... -v -race + go test ./... -v -race go/fmt: - cd src/ && go fmt ./... + go fmt ./... go/checkFmt: test -z $(shell gofmt -l .) build/docker: - cd src/ && go build -o fail2ban_exporter \ + go build -o fail2ban_exporter \ -ldflags '-X main.version=$(shell git describe --tags) -X main.commit=${shell git rev-parse HEAD} -X "main.date=${shell date --rfc-3339=seconds}" -X main.builtBy=docker' exporter.go docker/build/latest: diff --git a/src/auth/hash.go b/auth/hash.go similarity index 100% rename from src/auth/hash.go rename to auth/hash.go diff --git a/src/auth/hash_test.go b/auth/hash_test.go similarity index 100% rename from src/auth/hash_test.go rename to auth/hash_test.go diff --git a/src/auth/middleware.go b/auth/middleware.go similarity index 100% rename from src/auth/middleware.go rename to auth/middleware.go diff --git a/src/auth/middleware_test.go b/auth/middleware_test.go similarity index 100% rename from src/auth/middleware_test.go rename to auth/middleware_test.go diff --git a/src/cfg/basicAuth.go b/cfg/basicAuth.go similarity index 100% rename from src/cfg/basicAuth.go rename to cfg/basicAuth.go diff --git a/src/cfg/basicAuth_test.go b/cfg/basicAuth_test.go similarity index 100% rename from src/cfg/basicAuth_test.go rename to cfg/basicAuth_test.go diff --git a/src/cfg/cfg.go b/cfg/cfg.go similarity index 100% rename from src/cfg/cfg.go rename to cfg/cfg.go diff --git a/src/collector/f2b/collector.go b/collector/f2b/collector.go similarity index 100% rename from src/collector/f2b/collector.go rename to collector/f2b/collector.go diff --git a/src/collector/f2b/socket.go b/collector/f2b/socket.go similarity index 100% rename from src/collector/f2b/socket.go rename to collector/f2b/socket.go diff --git a/src/collector/textfile/collector.go b/collector/textfile/collector.go similarity index 100% rename from src/collector/textfile/collector.go rename to collector/textfile/collector.go diff --git a/src/collector/textfile/file.go b/collector/textfile/file.go similarity index 100% rename from src/collector/textfile/file.go rename to collector/textfile/file.go diff --git a/src/collector/textfile/writer.go b/collector/textfile/writer.go similarity index 100% rename from src/collector/textfile/writer.go rename to collector/textfile/writer.go diff --git a/src/exporter.go b/exporter.go similarity index 100% rename from src/exporter.go rename to exporter.go diff --git a/src/go.mod b/go.mod similarity index 100% rename from src/go.mod rename to go.mod diff --git a/src/go.sum b/go.sum similarity index 100% rename from src/go.sum rename to go.sum diff --git a/src/socket/decoder.go b/socket/decoder.go similarity index 100% rename from src/socket/decoder.go rename to socket/decoder.go diff --git a/src/socket/fail2banSocket.go b/socket/fail2banSocket.go similarity index 100% rename from src/socket/fail2banSocket.go rename to socket/fail2banSocket.go diff --git a/src/socket/protocol.go b/socket/protocol.go similarity index 100% rename from src/socket/protocol.go rename to socket/protocol.go