go-gorm / go-gorm/cli

style: use lowercase subtest names in test files

Open
#53 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
108
Forks
15
PR merge metrics
No merged PRs in 30d

Description

## Summary

Several test files use capitalized subtest names:

```go
t.Run("Test GetByID", func(t *testing.T) { ... })
t.Run("Test FilterWithColumn", func(t *testing.T) { ... })
```

Go convention for `t.Run()` names is fully lowercase descriptive phrases:

```go
t.Run("get by id", func(t *testing.T) { ... })
t.Run("filter with column", func(t *testing.T) { ... })
```

This reads more naturally in test output and follows the convention used in the standard library and most Go projects.

## Affected Files

- `examples/typed/query_test.go` — 6 subtests
- `examples/typed/filters/blacklist/iface_test.go`
- `examples/typed/filters/whitelist/iface_test.go`
- `examples/typed/filters/twolevel/iface_test.go`
- `examples/typed/filters/twolevel/nested/iface_test.go`
- `examples/typed/filters/pattern/iface_test.go`

## References

- [Go Code Review Comments — Use of subtests](https://github.com/golang/go/wiki/CodeReviewComments#use-of-subtests)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.