diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0829061..172a51a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,6 +29,6 @@ repos: - id: git-check # check for git conflict markers and whitespace errors - uses git internally - repo: https://github.com/psf/black - rev: 21.9b0 + rev: ec91a2b hooks: - id: black diff --git a/README.md b/README.md index 4e5bfaf..dcb20ef 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@
![A gif displaying `go-template` in action][demo-gif] - + [![Build status](https://img.shields.io/github/workflow/status/notsatan/go-template/Black?style=for-the-badge&logo=github)][black-action] [![No Dependencies](https://img.shields.io/badge/Dependencies-None-green?style=for-the-badge&logo=dependabot)][gomod-file] [![MIT License](https://img.shields.io/github/license/notsatan/go-template?color=red&style=for-the-badge)][project-license] diff --git a/cookiecutter.json b/cookiecutter.json index 844023c..4e4a6c2 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -9,9 +9,9 @@ "use_codecov": "y", "use_precommit": "y", "go_version": [ - "1.17", - "1.16", - "1.18" + "1.21", + "1.20", + "1.19" ], "license": [ "MIT", diff --git a/{{ cookiecutter.project_name.strip() }}/.github/workflows/linting.yml b/{{ cookiecutter.project_name.strip() }}/.github/workflows/linting.yml index fb21cd9..5401f1e 100644 --- a/{{ cookiecutter.project_name.strip() }}/.github/workflows/linting.yml +++ b/{{ cookiecutter.project_name.strip() }}/.github/workflows/linting.yml @@ -26,6 +26,11 @@ jobs: os: [ ubuntu-latest ] {% raw %} runs-on: ${{ matrix.os }} + + - name: Setup Go + uses: actions/setup-go@v3 + with: + go-version: ${{ matrix.go-version }} {% endraw %} steps: - name: Checkout code @@ -35,13 +40,10 @@ jobs: uses: golangci/golangci-lint-action@v3 with: # Must be specified without patch version: we always use the latest patch version. - version: v1.45 - - # If set to true then the action will use pre-installed Go - skip-go-installation: false + version: v1.55 # Optional: golangci-lint command line arguments. - # args: --issues-exit-code=0 + args: "--timeout 3m" # --issues-exit-code=0 # Optional: show only new issues if it's a pull request. The default value is `false`. # only-new-issues: true diff --git a/{{ cookiecutter.project_name.strip() }}/.gitignore b/{{ cookiecutter.project_name.strip() }}/.gitignore index 303c449..f5a8884 100644 --- a/{{ cookiecutter.project_name.strip() }}/.gitignore +++ b/{{ cookiecutter.project_name.strip() }}/.gitignore @@ -1,4 +1,4 @@ -# Cache folder generated by IDE +# Cache folders generated by IDE .vscode/** .idea/** @@ -15,3 +15,9 @@ coverage/** # Ignore config files from project root, keeping sample config files /configs** !/configs.**.sample + +# Ignore all secret files — they'll be used for project sensitive data +**.secrets +**.session +**.secret +**.cookie diff --git a/{{ cookiecutter.project_name.strip() }}/README.md b/{{ cookiecutter.project_name.strip() }}/README.md index 4535bde..b645271 100644 --- a/{{ cookiecutter.project_name.strip() }}/README.md +++ b/{{ cookiecutter.project_name.strip() }}/README.md @@ -7,7 +7,7 @@ {% if cookiecutter.use_codecov.lower() == 'y' -%} [![Code Coverage](https://img.shields.io/codecov/c/{{ cookiecutter.go_module_path.strip('/').replace('.com', '') }}?color=blue&logo=codecov&style=for-the-badge)][github-actions-tests] {% endif -%} -[![Security: bandit](https://img.shields.io/badge/Security-GoSec-lightgrey?style=for-the-badge&logo=springsecurity)](https://github.com/securego/gosec) +[![Security: GoSec](https://img.shields.io/badge/Security-GoSec-lightgrey?style=for-the-badge&logo=springsecurity)](https://github.com/securego/gosec) [![Dependencies Status](https://img.shields.io/badge/Dependencies-Up%20to%20Date-brightgreen?style=for-the-badge&logo=dependabot)][dependabot-pulls] [![Semantic Versioning](https://img.shields.io/badge/versioning-semantic-black?style=for-the-badge&logo=semver)][github-releases] [![Pre-Commit Enabled](https://img.shields.io/badge/Pre--Commit-Enabled-blue?style=for-the-badge&logo=pre-commit)][precommit-config] diff --git a/{{ cookiecutter.project_name.strip() }}/docker/Dockerfile b/{{ cookiecutter.project_name.strip() }}/docker/Dockerfile index 0bf06e1..cdbb164 100644 --- a/{{ cookiecutter.project_name.strip() }}/docker/Dockerfile +++ b/{{ cookiecutter.project_name.strip() }}/docker/Dockerfile @@ -55,6 +55,5 @@ ENV __BUILD_MODE__=${build_mode} ENV ${build_mode}_mode=${build_mode} # ^^ will be `debug_mode` or `production_mode` - # Run the binary CMD ["./{{ cookiecutter.project_name.strip() }}"]