Skip to content

Commit 1e9a7b0

Browse files
cweillclaude
andcommitted
feat: modernize codebase and improve test quality
This commit integrates improvements from several pending PRs and addresses key user feedback: ## Template Improvements (PR #184) - Use t.Fatalf() instead of t.Errorf() + return in subtests - Improves test ergonomics and reduces boilerplate - Updated golden test files to reflect new behavior ## Documentation Updates (PR #185, #180) - Document the -named flag for map-based table tests - Update installation from go get to go install (go get deprecated) - Update minimum Go version to 1.16 ## Use stdlib embed (PR #181) - Replace esc/go-bindata with Go 1.16+ embed package - Removes 834+ lines of generated code and 3rd party dependencies - Simplifies template loading and reduces maintenance burden - Convert symlinks in testify templates to real files for embed compatibility Breaking Changes: - Minimum Go version bumped from 1.6 to 1.16 (for embed support) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent d25c9b5 commit 1e9a7b0

19 files changed

+72
-834
lines changed

.claude/settings.local.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(git add:*)",
5+
"Bash(git commit:*)",
6+
"Bash(gh issue list:*)",
7+
"Bash(gh pr list:*)",
8+
"Bash(gh issue view:*)",
9+
"Bash(gh pr view:*)",
10+
"Bash(git tag:*)",
11+
"Bash(git show:*)",
12+
"Bash(go generate:*)",
13+
"Bash(go test:*)",
14+
"Bash(gh pr diff:*)",
15+
"Bash(gh api:*)",
16+
"Bash(for f in *.tmpl)",
17+
"Bash(do if [ -L \"$f\" ])",
18+
"Bash(fi)",
19+
"Bash(done)"
20+
],
21+
"deny": [],
22+
"ask": []
23+
}
24+
}

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@ The following shows `gotests` in action using the [official Sublime Text 3 plugi
1010

1111
## Installation
1212

13-
__Minimum Go version:__ Go 1.6
14-
15-
Use [`go get`](https://golang.org/cmd/go/#hdr-Download_and_install_packages_and_dependencies) to install and update:
13+
__Minimum Go version:__ Go 1.16
1614

15+
Use [`go install`](https://pkg.go.dev/cmd/go#hdr-Compile_and_install_packages_and_dependencies) to install and update:
1716
```sh
18-
$ go get -u github.com/cweill/gotests/...
17+
$ go install github.com/cweill/gotests/gotests@latest
1918
```
2019

2120
## Usage
@@ -39,6 +38,8 @@ Available options:
3938
4039
-i print test inputs in error messages
4140
41+
-named switch table tests from using slice to map (with test name for the key)
42+
4243
-only regexp. generate tests for functions and methods that match only.
4344
Takes precedence over -all
4445

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ module github.com/cweill/gotests
22

33
require golang.org/x/tools v0.0.0-20191109212701-97ad0ed33101
44

5-
go 1.6
5+
go 1.16

internal/render/README.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

internal/render/bindata/esc.go

Lines changed: 0 additions & 325 deletions
This file was deleted.

0 commit comments

Comments
 (0)