Skip to content

Commit a8bde6c

Browse files
committed
chore: run modernize -fix -test
1 parent bc225c6 commit a8bde6c

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

git_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ func Test_parseGithubRemote(t *testing.T) {
3333
},
3434
}
3535
for _, tt := range tests {
36-
tt := tt // pin to avoid scope issues (see scopelint)
3736
t.Run(tt.name, func(t *testing.T) {
3837
gotOwner, gotRepo, gotOk := parseGithubRemote(tt.remoteURL)
3938
if gotOwner != tt.wantOwner {
@@ -62,19 +61,19 @@ func Test_githubRepoDetect(t *testing.T) {
6261
}
6362

6463
func Benchmark_detectRemoteURL_GoGit(b *testing.B) {
65-
for i := 0; i < b.N; i++ {
64+
for b.Loop() {
6665
_detectRemoteURL_GoGit(".")
6766
}
6867
}
6968

7069
func Benchmark_detectRemoteURL_LocalGit(b *testing.B) {
71-
for i := 0; i < b.N; i++ {
70+
for b.Loop() {
7271
_detectRemoteURL_LocalGit(".")
7372
}
7473
}
7574

7675
func Benchmark_parseGithubRemote(b *testing.B) {
77-
for i := 0; i < b.N; i++ {
76+
for b.Loop() {
7877
parseGithubRemote("https://github.com/mroth/bump.git")
7978
}
8079
}

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var (
2424
// VerboseLogging sets whether to log debug/timing info to stderr
2525
var VerboseLogging = false
2626

27-
func logVerbose(format string, v ...interface{}) {
27+
func logVerbose(format string, v ...any) {
2828
if VerboseLogging {
2929
log.Printf(format, v...)
3030
}

options_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ func TestOptionsPrecedence(t *testing.T) {
8585

8686
originalEnv := os.Environ()
8787
for _, tC := range testCases {
88-
tC := tC // pin to avoid scope issues (see scopelint)
8988
t.Run(tC.desc, func(t *testing.T) {
9089
resetEnviron(tC.env)
9190
actualOpts, _ := ParseFlags(NewOptionsFromEnv(), tC.args)

0 commit comments

Comments
 (0)