maligned
maligned copied to clipboard
Tool to detect Go structs that would take less memory if their fields were sorted.
👋🏽 hi ### What awesome tool! I see it is deprecated, so I think it's best to archive the repo, which will keep it public, but warn the users that...
hi, i know that fieldalignment now preferred way to check/fix field alignment in golang structs. how to deal with it if i want to have automatic align fields via own...
Add `-v` to display fields where padding is added. Example: ``` ...\encoder_options.go:14:21: struct of size 64 could be 56 Field sizes in order: * concurrent int: 8:8 * crc bool:...
It is already calculated, just the printing lacks.
This is a great project. Thank you for sharing it with the community. I discovered the project when [gometalinter](https://github.com/alecthomas/gometalinter) ran against some of my code and found an inefficient alignment...
Given the code: model.go ``` package addrs // ASDExchanger bla bla type ASDExchanger struct { ASDBtcExchangeRate string `mapstructure:"asd_btc_exchange_rate"` ASDBtcExchangeRateUSD string `mapstructure:"asd_btc_exchange_rate_usd"` ASDBtcExchangeLabel string `mapstructure:"asd_btc_exchange_label"` ASDBtcExchangeEnabled bool `mapstructure:"asd_btc_exchange_enabled"` ASDEthExchangeRate string `mapstructure:"asd_eth_exchange_rate"`...