go-gorm / go-gorm/cli

refactor: rename unexported `associationWithConditions` to shorter name

Open
#49 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

The unexported type `associationWithConditions` in `field/association.go` is 27 characters long. For an internal type used in a single file, Go convention favors shorter names.

## Current

```go
type associationWithConditions[T any] struct {
name string
conditions []clause.Expression
}
```

## Proposed

```go
type assocCond[T any] struct {
name string
conditions []clause.Expression
}
```

## Affected File

- `field/association.go` — type definition and all references (struct embedding, method receivers)

## References

- [Effective Go — Names](https://go.dev/doc/effective_go#names)

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.