summary refs log tree commit diff
path: root/.config/yamlfs/go.yaml
diff options
context:
space:
mode:
Diffstat (limited to '.config/yamlfs/go.yaml')
-rw-r--r--.config/yamlfs/go.yaml169
1 files changed, 0 insertions, 169 deletions
diff --git a/.config/yamlfs/go.yaml b/.config/yamlfs/go.yaml
deleted file mode 100644
index 96f6599..0000000
--- a/.config/yamlfs/go.yaml
+++ /dev/null
@@ -1,169 +0,0 @@
-{% $man := .man %}
-cmd:
-  {% .name %}:
-    main.go: |
-      package main
-
-      func main() {
-      	println("hello world")
-      }
-
-version:
-  version.go: |
-    package version
-
-    var (
-    	Package = "{% .pkg %}"
-    	Revision = "-"
-    	Version = "0.0.0+unknown"
-    )
-
-go.mod: |
-{% exec "sh" "-c" (printf "cd /tmp/;go mod init %s;cat go.mod;rm go.mod;" .pkg) | indent 4 %}
-
-Makefile: |
-  .POSIX:
-
-  DESTDIR      ?= .
-  BINDIR       ?= $(PREFIX)/bin
-  MANDIR       ?= $(PREFIX)/share/man
-  VERSION      ?= $(shell git describe --match 'v[0-9]*' --dirty='+dev' --always --tags || printf "0.0.0+unknown")
-  REVISION     ?= $(shell git rev-parse HEAD || printf "-")
-  
-  GO           ?= go
-  GOLINT       ?= $(GO) vet # golangci-lint run --build-tags "$(GO_BUILDTAGS)"
-  GOTEST       ?= $(GO) test # gotestsum --format=testname --
-  {% if $man -%}
-  SCDOC        ?= scdoc
-  {%- end %}
-  
-  GO_BUILDTAGS ?= netgo osusergo static_build
-  GO_LDFLAGS   ?= -s -w -extldflags -static
-  GOTEST_FLAGS ?=
-  GOLINT_FLAGS ?=
-
-  all: lint test build {% if $man %}man{% end %}
-
-  .PHONY: build
-  build: {% .name %}
-
-  {% .name %}: GO_PKG = {% .pkg %}
-  {% .name %}: GO_VERSIONFLAGS += -X $(GO_PKG)/version.Version=$(VERSION)
-  {% .name %}: GO_VERSIONFLAGS += -X $(GO_PKG)/version.Revision=$(REVISION)
-  {% .name %}: GO_VERSIONFLAGS += -X $(GO_PKG)/version.Package=$(GO_PKG)
-  {% .name %}: $(shell find . -name '*.go')
-  	$(GO) build -o $(DESTDIR)$(PREFIX)/$@ -tags '$(GO_BUILDTAGS)' -ldflags '$(GO_LDFLAGS) $(GO_VERSIONFLAGS)' ./cmd/$@
-
-  .PHONY: lint
-  lint:
-  	$(GOLINT) $(GOLINT_FLAGS) ./...
-  .PHONY: validate
-  validate: lint
-
-  .PHONY: test
-  test:
-  	$(GOTEST) $(GOTEST_FLAGS) -tags '$(GO_BUILDTAGS)' -cover -covermode=atomic ./...
-  .PHONY: check
-  check: test
-
-  {% if $man %}
-  manpages = doc/{% .name %}.1
-  $(manpages): %: %.scd
-  $(manpages):
-  	$(SCDOC) <$^ >$@
-  .PHONY:
-  man: $(manpages)
-
-  {% end %}
-  .PHONY: clean
-  clean: RM ?= rm -f
-  clean:
-  	$(RM) {% .name %}
-
-  .PHONY: install
-  install:
-  	mkdir -p $(DESTDIR)$(BINDIR)
-	{% if $man -%}
-  	mkdir -p $(DESTDIR)$(MANDIR)/man1
-  	{%- end %}
-  	cp -f {% .name %} $(DESTDIR)$(BINDIR)
-	{% if $man -%}
-  	cp -f doc/{% .name %}.1 $(DESTDIR)$(MANDIR)/man1
-  	{%- end %}
-
-  .PHONY: uninstall
-  uninstall:
-  	rm -v $(DESTDIR)$(BINDIR)/{% .name %}
-	{% if $man -%}
-  	rm -v $(DESTDIR)$(MANDIR)/man1/{% .name %}.1
-  	{%- end %}
-
-  .PHONY: help
-  help:
-  	@printf "Usage:\n"
-  	@printf "  build             build\n"
-  	@printf "  validate          linter\n"
-  	@printf "  test              tests\n"
-  	@printf "  (un)install       install into system directories\n"
-  	@printf "\n"
-  	@printf "  DESTDIR, PREFIX   install location\n"
-  	@printf "\n"
-
-.editorconfig: |
-  ; http://editorconfig.org/
-
-  root = true
-
-  [*]
-  insert_final_newline = true
-  charset = utf-8
-  trim_trailing_whitespace = true
-  indent_style = space
-  indent_size = 2
-
-  [{Makefile,go.mod,go.sum,*go}]
-  indent_style = tab
-  indent_size = 4
-
-  [*.md]
-  trim_trailing_whitespace = false
-
-  [Dockerfile]
-  indent_size = 4
-
-README.md: |
-  # {% .name %}
-
-  TODO
-
-{% if $man %}
-doc:
-  {% .name %}.1.scd: |
-    {% .name %}(1)
-
-    # NAME
-
-    {% .name %} - TODO
-
-    # SYNOPSIS
-
-    *{% .name %}* [options...]
-
-    # DESCRIPTION
-
-    TODO
-
-    # OPTIONS
-
-    *-h, -help*
-    	Show help message and quit.
-
-    # SEE ALSO
-
-    	*{% .name %}*(5)
-
-    # AUTHORS
-
-    Maintained by TODO author <mail>.
-    For more information, see {% .pkg %}.
-{% end %}