You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fieldalignment -fix main.go
/Users/TiM/Downloads/GolandProjects/helloworld/main.go:3:10: struct of size 104 could be 88
fieldalignment result
type Car struct {
F5 error
F3 *int32
Name string
F4 []byte
F2 int64
age int32
age2 int32
age3 int16
flag bool
InnerStruct struct{ InnerByte byte }
F1 int8
}
structslop
structslop -apply main.go
/Users/TiM/Downloads/GolandProjects/helloworld/main.go:3:10: struct has size 104 (size class 112), could be 88 (size class 96), you'll save 14.29% if you rearrange it to:
struct {
F4 []byte
Name string
F5 error
F3 *int32
F2 int64
age int32
age2 int32
age3 int16
flag bool
InnerStruct struct{ InnerByte byte }
F1 int8
}
structslop result
type Car struct {
F4 []byte
Name string
F5 error
F3 *int32
F2 int64
age int32
age2 int32
age3 int16
flag bool
InnerStruct struct{ InnerByte byte }
F1 int8
}
The results for fieldalignment and structslop are not the same
fieldalignment
fieldalignment result
structslop
structslop result
The results for fieldalignment and structslop are not the same
test the under
Car
with fieldalignmentThe text was updated successfully, but these errors were encountered: