Skip to content

refactor(template): simplify codes in template.go #1072

refactor(template): simplify codes in template.go

refactor(template): simplify codes in template.go #1072

Workflow file for this run

name: jzero-ci
on:
push:
paths-ignore:
- 'docs/**'
- '**.md'
pull_request:
jobs:
golangci:
name: ci
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: '1.22.3'
- name: Install Tool
run: |
go install
jzero check
go install github.com/fsgo/go_fmt/cmd/gorgeous@latest
- name: format go
run: |
gorgeous -d ./...
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: latest
# Optional: working directory, useful for monorepos
working-directory: ./
# Optional: golangci-lint command line arguments.
args: --timeout 300s --verbose
# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true
# Optional: if set to true then the action will use pre-installed Go.
skip-go-installation: true
# Optional: if set to true then the action don't cache or restore ~/go/pkg.
skip-pkg-cache: true
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
# skip-build-cache: true