Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

envconfig: sort strcut fields for reduce memory #51

Merged
merged 1 commit into from Apr 11, 2022

Conversation

zchee
Copy link
Contributor

@zchee zchee commented Apr 10, 2022

envconfig: sort struct fields to reduce memory.

Sort struct fields suggested by fieldalignment. But continue to sort alphabetical order as much as possible.

$ go vet -vettool=$(which fieldalignment) ./...
./envconfig.go:188:21: struct with 32 pointer bytes could be 24
./envconfig.go:222:14: struct of size 80 could be 72

Sort struct fields suggested by fieldalignment. But continue to sort
alphabetical order as much as possible.

$ go vet -vettool=$(which fieldalignment) ./...
./envconfig.go:188:21: struct with 32 pointer bytes could be 24
./envconfig.go:222:14: struct of size 80 could be 72

Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
@sethvargo sethvargo merged commit 0c8b803 into sethvargo:main Apr 11, 2022
@zchee
Copy link
Contributor Author

zchee commented Apr 11, 2022

@sethvargo @mikehelmick Thanks!

@zchee zchee deleted the sort-field branch April 11, 2022 14:58
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants