Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
13 changes: 10 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.23
go-version-file: 'go.mod'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh that’s neat


- name: Build
run: go build -v ./...
Expand All @@ -28,6 +28,13 @@ jobs:
run: go test -v ./...

- name: Lint
uses: golangci/golangci-lint-action@v6
uses: golangci/golangci-lint-action@v8
with:
version: v1.61
version: v2.3.0

- name: Vendorcheck
shell: bash
run: |
go mod tidy
go mod vendor
git diff --exit-code
45 changes: 21 additions & 24 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
linters-settings:
gocyclo:
min-complexity: 25
govet:
check-shadowing: false
misspell:
locale: "US"

version: "2"
linters:
enable-all: true
default: all
disable:
- stylecheck
- gosec
- dupl
- depguard
- lll
- prealloc
- gocritic
- gochecknoinits
- gochecknoglobals
- err113
- exhaustruct
- testpackage
- paralleltest
- nlreturn
- funlen
- lll
- musttag
- perfsprint
# These are deprecated
- execinquery
- exportloopref
- gomnd
- testpackage
- varnamelen
- wsl
- wsl_v5
settings:
misspell:
locale: US
exclusions:
presets:
- std-error-handling
formatters:
enable:
- gofmt
- gofumpt
- goimports
25 changes: 0 additions & 25 deletions CHECKLIST.md

This file was deleted.

38 changes: 33 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,41 @@
# gorepotemplate

[![Build Status](https://github.com/letsencrypt/gorepotemplate/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/letsencrypt/gorepotemplate/actions/workflows/test.yml?query=branch%3Amain)

A short description of the project goes here.
This repository serves as a template for other small go projects started by the
Let's Encrypt team. You should replace this title and description with one
appropriate to your project.

## Usage

How to use the project, whether in source or binary form.
This section should describe how to use your project. Here's how to use this
template repo:

1. Navigate to https://github.com/letsencrypt/gorepotemplate
2. Click "Use this template" and select "Create a new repository"
3. Select "letsencrypt" as the Owner of the repo, give it a good name, and
create it
5. Set up the correct [general settings](settings):
- Under Features, only select "Issues" and "Preserve this repository"
- Under Pull Requests, only select "Allow squash merging", and set the commit
message to "Pull request title and description"
- Select "Automatically delete head branches"
6. Set up the correct [team access](settings/teams):
- Grant both the Boulder Developers and Ops teams "write" permission
7. Set up the correct [rulesets](settings/rules):
- Create a "New branch ruleset"
- Name it "Protect main", and set the target branches to "Include default
branch"
- Restrict creation, restrict deletion, require linear history, and block
force pushes
- Require a pull request before merging, with 1 required approval, dismissing
stale approvals, requiring review from Code Owners, and requiring approval
of the most recent reviewable push
- Only allow the Squash merge method
- Require status checks to pass, and add the "test" job as a required check.
8. Create a PR updating this README file, and you're done!
- Optionally: also update the CODEOWNERS file to represent what team will own
this code.

## Contributing

How to set up a development environment, make changes, and run tests.
This section should describe how to set up a development environment, make
changes, and run tests.
38 changes: 0 additions & 38 deletions checklist.complete.sh

This file was deleted.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/letsencrypt/gorepotemplate

go 1.23
go 1.24
4 changes: 4 additions & 0 deletions hello_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import "testing"

// TestHello tests that the Hello function produces the expected greeting.
func TestHello(t *testing.T) {
t.Parallel()

testCases := []struct {
TestCaseName string
Name string
Expand Down Expand Up @@ -32,6 +34,8 @@ func TestHello(t *testing.T) {

for _, tc := range testCases {
t.Run(tc.TestCaseName, func(t *testing.T) {
t.Parallel()

if greeting := Hello(tc.Name); greeting != tc.ExpectedGreeting {
t.Errorf("hello(%q) returned %q not %q",
tc.Name, greeting, tc.ExpectedGreeting)
Expand Down
Loading