git » gofer » commit d5b3111

Move reference config from etc/ to config/

author Alberto Bertogli
2022-10-08 11:36:39 UTC
committer Alberto Bertogli
2022-10-09 11:34:34 UTC
parent 18c285dd09b877cb2074173ff916817a3d1758b7

Move reference config from etc/ to config/

This patch moves the reference config and schema from etc/ to config/,
so it is closer to the config parser, and leave etc/ to be used for
ancillary files useful in common setups.

Makefile +2 -2
README.md +2 -2
{etc => config}/gofer.schema.cue +0 -0
{etc => config}/gofer.yaml +0 -0
gofer_test.go +1 -1

diff --git a/Makefile b/Makefile
index deb8999..11185cc 100644
--- a/Makefile
+++ b/Makefile
@@ -16,9 +16,9 @@ gofer:
 		-X blitiri.com.ar/go/gofer/debug.SourceDateTs=${SOURCE_DATE_EPOCH} \
 		" ${GOFLAGS}
 
-vet: etc/gofer.yaml test/01-be.yaml test/01-fe.yaml
+vet: config/gofer.yaml test/01-be.yaml test/01-fe.yaml
 	go vet ./...
-	cue vet etc/gofer.schema.cue $^
+	cue vet config/gofer.schema.cue $^
 
 test: vet
 	go test ./...
diff --git a/README.md b/README.md
index 9e07363..3ee1a7e 100644
--- a/README.md
+++ b/README.md
@@ -25,8 +25,8 @@ go install blitiri.com.ar/go/gofer@latest
 
 ## Configure
 
-See the [sample config](etc/gofer.yaml) for details on how to configure gofer,
-and what features are available.
+See the [reference config](config/gofer.yaml) for details on how to configure
+gofer, and what features are available.
 
 
 ## Contact
diff --git a/etc/gofer.schema.cue b/config/gofer.schema.cue
similarity index 100%
rename from etc/gofer.schema.cue
rename to config/gofer.schema.cue
diff --git a/etc/gofer.yaml b/config/gofer.yaml
similarity index 100%
rename from etc/gofer.yaml
rename to config/gofer.yaml
diff --git a/gofer_test.go b/gofer_test.go
index 7adc4bb..7d1bdda 100644
--- a/gofer_test.go
+++ b/gofer_test.go
@@ -12,7 +12,7 @@ import (
 )
 
 func TestDumpConfig(t *testing.T) {
-	conf, err := config.Load("etc/gofer.yaml")
+	conf, err := config.Load("config/gofer.yaml")
 	if err != nil {
 		t.Fatalf("error loading config example: %v", err)
 	}