Changelog of the template repository for Go projects.
Updated to Go 1.16 — #54 ⇄ #55 (⊶ 1f20fe12)
↠ Go 1.16 is finally released so the Go version used for the actions/setup-go
action in the ci
workflow has been updated from 1.15.x
to 1.16.x
and the defined Go version in the go.mod
file bumped to go 1.16
.
Node.js package dependency & GitHub action version updates — #42, #47
↠ Bumped outdated Node.js package dependencies and GitHub actions to their latest versions:
- #48, #52 (⊶ e2487f2b, c13b8122)
actions/setup-node
from v2.1.3 to v2.1.5 - #49 (⊶ 9250ff93)
github.com/stretchr/testify
from v1.6.1 to v1.7.0 - #50, #51, #53 (⊶ bd642b5c, ba39b7e1, f208cdcc)
golangci/golangci-lint-action
from v2 to v2.5.2
Renamed /app
to /apps
— #37 ⇄ #38 (⊶ 5551df2f)
↠ Using the majority apps
as name for the /app
directory conveys a better understanding of the actual use case and makes it more clear that it can contain more than one application in the monorepo layout.
This also aligns with the example in the /web
directory documentation and the Yarn/NPM workspace configuration in the package.json
file where both using the apps
directory.
Disabled errorlint
to prevent false-positive errors — #39 ⇄ #40 (⊶ 28f888a2)
↠ In #21 golangci-lint
was updated to the currently latest version 1.32.0 which introduced the errorlint that has been enabled for this template repository. As it turns out it causes a lot of false-positives errors for code lines that explicitly do not wrap the error to prevent it become part of the public API.
Therefore the linter has been disabled again because the update also introduced the new wrapcheck linter which helps to prevent that errors from external packages are exposed to the public API.
Update to “tmpl“ template repository version 0.8.0 — #45 ⇄ #46 (⊶ 39cf0b85)
↠ Updated to “tmpl“ version 0.8.0 which reduces Dependabot PR noise for the NPM package ecosystem.
Prepared project/repository publication — #35 ⇄ #36 (⊶ 0aec1aef)
↠ Before switching the GitHub repository visibility to “public“ a few adjustments had to be made. Basically #22 was reverted, taking the changes from #23 into account, so that SVG images like the repository hero are using the URLs for public repositories again instead of the ones that allow to resolve the files in private repositories.
Node.js package dependency & GitHub action version updates — #42, #47
↠ Bumped outdated Node.js package dependencies and GitHub actions to their latest versions:
- #42 (⊶ 6e91700f)
prettier
from 2.1.2 to 2.2.1 — The the official Prettier 2.2 introduction blog post for more details. - #47 (⊶ 90c22f24)
actions/setup-node
from v2.1.2 to v2.1.3
Initial project documentation — #31 ⇄ #32 (⊶ d1a77a3d)
↠ Wrote the initial project documentation for the README.md
file that includes…
- …an project introduction and motivation.
- …an overview of the project features.
- …an overview of the directory structure.
- …more detailed sections about all features.
- …some basic instructions how to use this template repository.
- …information about references used for this template repository.
- …information about how to contribute to this project.
Each directory documented in step 3 contains an individual documentation with more detailed information about it.
The package.json
file has also been extended to include the Yarn/NPM workspaces
field.
Update to tmpl
template repository version 0.7.0 — #24, #33 ⇄ #25, #34 (⊶ 793efc26, 81385803)
↠ Updated to tmpl
version 0.7.0 (including version 0.6.0) which introduced a configuration for automated dependency updates and security alerts with Dependabot. Next to the included update configurations for the CI/CD GitHub action workflow and Yarn/NPM dependencies, the file has been extended to support Go modules.
This version also updated to the latest Node.js package dependency & GitHub Action versions.
Update to golangci-lint version 1.32.0 — #20 ⇄ #21 (⊶ 072aad99)
↠ The currently latest golangci-lint
version 1.32.0 introduced new linters that have been configured for this template repository:
- wrapcheck — Checks that errors returned from external packages are wrapped. This linter is disabled by default, but has been enabled for this template repository to help tp reduce error context loss.
- errorlint — Helps to make more efficient use of the error wrapping scheme introduced in Go 1.13. This linter is disabled by default, but has been enabled for this template repository to help to use Go's new error handling concept.
- tparallel — Detects inappropriate usage of
t.Parallel()
method in Go tests. This linter is disabled by default, but has been enabled for this template repository to help to prevent parallelism errors in tests.
Update to "tmpl" template repository version 0.5.0 — #22 ⇄ #23 (⊶ 5da341c3)
↠ Updated to "tmpl" version 0.5.0 which now uses a namespace for the NPM package name that helps to prevent collisions with already existing NPM packages like tmpl.
Go stub package and test — #12 ⇄ #13 (⊶ 66658a15)
↠ To prevent golangci-lint
and the CI workflow test
job from failing a stub file for the tmplgo
package has been added along with a example test (tmplgo_test
package).
This also comes with the benefit of providing a simple starting point for users of this template repository.
Optimize Go version matrix strategy for CI workflow — #16 ⇄ #17 (⊶ bda13d8a)
↠ Before the CI workflow used a matrix strategy to run the lint-go
and test
jobs, but this has been improved to make the workflow run faster by avoiding unnecessary steps:
- The
lint-go
job has been changed to only run on the currently latest stable Go version1.15.x
only on Linux becausegolangci-lint
doesn't care about the Go version and OS it runs on but only statically checks the source code. - The
test
job has been changed to only run on the currently latest stable Go version1.15.x
.
These changes help to keep the required GitHub Action run minutes for the account of this repository as small as possible without wasting resources for unnecessary tasks.
Adapt CI workflow "on" run configurations from "tmpl" template repository — #18 ⇄ #19 (⊶ ec1539cd)
↠ Before the CI workflow only used the push
configuration for the on
field. To improve the performance a more fine grained configuration is now used that has already been defined in the "tmpl" template repository:
- Only runs on pushes to the
main
branch. - Only runs on pushes for
v*
tags. - Always runs for pushes to PRs.
These changes help to keep the required GitHub Action run minutes for the account of this repository as small as possible without wasting resources for unnecessary runs.
Adapt to "tmpl" template repository version 0.4.0 — #14 ⇄ #15 (⊶ 9d50ec0e)
↠ Adapted to "tmpl" version 0.4.0 which includes a optimized OS version matrix strategy for Node based tasks in the CI workflow that helps to keep the required GitHub Action run minutes for the account of this repository as small as possible without wasting resources for unnecessary tasks.
Basic testing in CI workflow — #10 ⇄ #11 (⊶ f65759e6)
↠ Before the CI workflow only ran Node and Go based linters, but doesn't took Go tests into account. This has been changed by adding a new job to run tests with Go's official go test
command with enabled coverage and race detector.
YAML multiline string without "block chomping" for config go-header linter causes golangci-lint to fail — #6 ⇄ #7 (⊶ 910c06ff)
↠ The configuration of the go-header linter is defined in the golangci-lint YAML configuration, but the YAML multiline-string doesn't used "block chomping which resulted in a final newline at the end of the template. This caused golangci-lint to fail because the configured template content doesn't match the parsed text. To fix this problem the YAML block chomping syntax is now used for the multiline-string so that the final newline at the end gets stripped.
Invalid branch & CI workflow name in README badges — #8 ⇄ #9 (⊶ e138ca15)
↠ The name of the branch for the badge URL of the repository changelog was master
instead of main
and the GitHub CI action workflow used the uppercase name CI
instead of ci
.
This is the initial release version of tmpl-go. The basic project setup, structure and development workflow has been bootstrapped by the base tmpl template repository. The additional Go specific initial configurations and documentations are covered in the following sections of this version changelog to introduce used technologies and explain why several decisions have been made.
Bootstrap from "tmpl" base template repository — #1 (⊶ 87400d37)
↠ Bootstrapped the basic project setup, structure and development workflow from version 0.3.0 of the base "tmpl" template repository. Additionally specific assets like the repository hero image were also added.
Go Module — #1 ⇄ #3 (⊶ 52bea37b)
↠ tmpl-go uses the currently latest Go version 1.15.0 with Go Modules and github.com/svengreb/tmpl-go
as module name.
Code quality with "golangci-lint" — #4 ⇄ #5 (⊶ b20e205f)
↠ To ensure a good code quality the Go ecosystem has hundreds of linters, each with a different purpose. Instead of installing and running multiple linters separately golangci-lint provides a uniform interface to run most popular and useful linters in parallel and with many additional configuration features.
The actual runner is open source and can be used locally as well in any private CI/CD pipeline. In order to use it for tmpl-go, a .golangci.yml
configuration file has been added.
The runner is used in the the existing CI GitHub action workflow through the golangci-lint-action GitHub action that has been created by the golangci-lint maintainers.