Skip to content

Commit

Permalink
Merge pull request #51 from notsatan/feature/upgrade
Browse files Browse the repository at this point in the history
Bunch of minor changes, and some chores

 - Update the `black` revision used for pre-commit
 - Bump Go versions offered as choices: `1.21`, `,1.20` and `1.19`
 - Updates to the linter workflow to accommodate upstream changes
 - New ignore rules for generated projects, ignores session files

Signed-off-by: notsatan <git@notsatan.me>
  • Loading branch information
notsatan committed Jan 2, 2024
2 parents 713df20 + 2233531 commit 3933e93
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div align="center">

![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]
Expand Down
6 changes: 3 additions & 3 deletions cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
8 changes: 7 additions & 1 deletion {{ cookiecutter.project_name.strip() }}/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Cache folder generated by IDE
# Cache folders generated by IDE
.vscode/**
.idea/**

Expand All @@ -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
2 changes: 1 addition & 1 deletion {{ cookiecutter.project_name.strip() }}/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
1 change: 0 additions & 1 deletion {{ cookiecutter.project_name.strip() }}/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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() }}"]

0 comments on commit 3933e93

Please sign in to comment.