From 1c3ad50e2c7b605ba8a06cb5a92eb4bfcad199a7 Mon Sep 17 00:00:00 2001 From: Steffen Exler Date: Fri, 29 Apr 2022 16:19:33 +0200 Subject: [PATCH] Remove rarly used template files Signed-off-by: Steffen Exler --- _template/.dockerignore | 2 -- _template/assets/.gitkeep | 0 _template/configs/.gitkeep | 0 _template/deployments/.gitkeep | 0 .../0001-record-architecture-decisions.md | 19 ------------------- _template/internal/.gitkeep | 0 _template/internal/README.md | 3 +++ _template/pkg/.gitkeep | 0 _template/pkg/README.md | 3 +++ embed_gen.go | 2 +- 10 files changed, 7 insertions(+), 22 deletions(-) delete mode 100644 _template/assets/.gitkeep delete mode 100644 _template/configs/.gitkeep delete mode 100644 _template/deployments/.gitkeep delete mode 100644 _template/docs/architecture/0001-record-architecture-decisions.md delete mode 100644 _template/internal/.gitkeep create mode 100644 _template/internal/README.md delete mode 100644 _template/pkg/.gitkeep create mode 100644 _template/pkg/README.md diff --git a/_template/.dockerignore b/_template/.dockerignore index 3c947cc6..8d35d321 100644 --- a/_template/.dockerignore +++ b/_template/.dockerignore @@ -13,11 +13,9 @@ out/ # docs api/ -docs/ **/*.md # other files not needed for build -deployments/ .editorconfig .golangci.yml Makefile diff --git a/_template/assets/.gitkeep b/_template/assets/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/_template/configs/.gitkeep b/_template/configs/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/_template/deployments/.gitkeep b/_template/deployments/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/_template/docs/architecture/0001-record-architecture-decisions.md b/_template/docs/architecture/0001-record-architecture-decisions.md deleted file mode 100644 index 2c601d56..00000000 --- a/_template/docs/architecture/0001-record-architecture-decisions.md +++ /dev/null @@ -1,19 +0,0 @@ -# 1. Record architecture decisions - -Date: 2006-01-02 - -## Status - -Accepted - -## Context - -We need to record the architectural decisions made on this project. - -## Decision - -We will use Architecture Decision Records, as [described by Michael Nygard](http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions). - -## Consequences - -See Michael Nygard's article, linked above. For a lightweight ADR toolset, see Nat Pryce's [adr-tools](https://github.com/npryce/adr-tools). diff --git a/_template/internal/.gitkeep b/_template/internal/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/_template/internal/README.md b/_template/internal/README.md new file mode 100644 index 00000000..0f6fea0a --- /dev/null +++ b/_template/internal/README.md @@ -0,0 +1,3 @@ +# `/internal` + +Private application and library code. This is the code you don't want others importing in their applications or libraries. Note that this layout pattern is enforced by the Go compiler itself. See the Go 1.4 [`release notes`](https://golang.org/doc/go1.4#internalpackages) for more details. Note that you are not limited to the top level `internal` directory. You can have more than one `internal` directory at any level of your project tree. diff --git a/_template/pkg/.gitkeep b/_template/pkg/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/_template/pkg/README.md b/_template/pkg/README.md new file mode 100644 index 00000000..61a9ce63 --- /dev/null +++ b/_template/pkg/README.md @@ -0,0 +1,3 @@ +# `/pkg` + +Library code that's ok to use by external applications (e.g., `/pkg/mypubliclib`). Other projects will import these libraries expecting them to work, so think twice before you put something here :-) Note that the `internal` directory is a better way to ensure your private packages are not importable because it's enforced by Go. The `/pkg` directory is still a good way to explicitly communicate that the code in that directory is safe for use by others. The [`I'll take pkg over internal`](https://travisjeffery.com/b/2019/11/i-ll-take-pkg-over-internal/) blog post by Travis Jeffery provides a good overview of the `pkg` and `internal` directories and when it might make sense to use them. diff --git a/embed_gen.go b/embed_gen.go index b54b879d..a0bbbd11 100644 --- a/embed_gen.go +++ b/embed_gen.go @@ -3,5 +3,5 @@ package gotemplate import "embed" -//go:embed _template _template/.azure-pipelines.yml _template/.dockerignore _template/.editorconfig _template/.githooks _template/.github _template/.gitignore _template/.gitlab-ci.yml _template/.golangci.yml _template/assets/.gitkeep _template/configs/.gitkeep _template/deployments/.gitkeep _template/internal/.gitkeep _template/pkg/.gitkeep +//go:embed _template _template/.azure-pipelines.yml _template/.dockerignore _template/.editorconfig _template/.githooks _template/.github _template/.gitignore _template/.gitlab-ci.yml _template/.golangci.yml var FS embed.FS