fuzzyworld

template / commit

fix CI: add cmd/template/main.go missing due to .gitignore pattern

9d506c388415ed32ae8aff738bb5d8c6b0d54550 · Pavel Safronov · 2026-05-01 13:40:55 -0700 · parents cd48b06840dd

fix CI: add cmd/template/main.go missing due to .gitignore pattern

The .gitignore entry 'template' matched the cmd/template/ directory,
silently excluding main.go from the repo. Anchored it to '/template'
to only ignore the root-level built binary.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
 .gitignore           |  2 +-
 cmd/template/main.go | 16 ++++++++++++++++
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index 4a56eb6..c2a406c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,7 +4,7 @@
 # distributables
 dist
 template.exe
-template

+/template

 
 # test
 test
diff --git a/cmd/template/main.go b/cmd/template/main.go
new file mode 100644
index 0000000..da8585d
--- /dev/null
+++ b/cmd/template/main.go
@@ -0,0 +1,16 @@
+package main
+
+import (
+	"os"
+
+	log "github.com/sirupsen/logrus"
+	"gitlab.com/PavelSafronov/template/internal/core"
+)
+
+var Version string
+
+func main() {
+	if err := core.Run(os.Args, Version); err != nil {
+		log.Fatal(err)
+	}
+}