Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

chore: Enable fieldalignment go vet check #35

Merged
merged 4 commits into from
Jan 30, 2024

Conversation

patriciareinoso
Copy link
Contributor

Enable fieldalignment go vet check in CI
fieldalignment defines an Analyzer that detects structs that would use less memory if their fields were sorted.

patriciareinoso and others added 3 commits January 18, 2024 18:16
Signed-off-by: Patricia Reinoso <patricia.reinoso@canonical.com>
Signed-off-by: Patricia Reinoso <patricia.reinoso@canonical.com>
message.go Show resolved Hide resolved
@@ -26,8 +26,8 @@ type PacketRate struct {
ULPR bool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was expecting these two bool variables to be moved to the end... What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as the other comments. No error shown by go ve.
PacketRateTimeUnit is a uint8 so we get 4 bytes next to 2 bytes + 2 bytes. I think that would be well accomadated

pfcpType/SDFFilter.go Outdated Show resolved Hide resolved
pfcpType/UEIPAddress.go Show resolved Hide resolved
pfcpType/UserPlaneIPResourceInformation.go Outdated Show resolved Hide resolved
Signed-off-by: Patricia Reinoso <patricia.reinoso@canonical.com>
Copy link
Contributor

@gab-arrobo gab-arrobo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 (tested changes with AiaB using replace directive in SMF's go.mod)

@gab-arrobo gab-arrobo merged commit 0503a69 into omec-project:master Jan 30, 2024
6 checks passed
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants