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

chore: Enable field alignment go vet check #127

Merged

Conversation

patriciareinoso
Copy link
Contributor

Go vet checks were enabled in #116
(but they were disable in following commits)
This PR re enables all go vet analyzers and fixes fieldalignment analyzer

Signed-off-by: Patricia Reinoso <[email protected]>
@onf-bot
Copy link
Contributor

onf-bot commented Jan 26, 2024

Can one of the admins verify this patch?

@thakurajayL
Copy link
Contributor

thakurajayL commented Jan 26, 2024

@gab-arrobo can you please review this.
@patriciareinoso could you please resolve conflict.

@gab-arrobo
Copy link
Contributor

@gab-arrobo can you please review this.

Will do

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.

Please taka look at the comments and let me know what you think... This is someting that could be done in several files because /* logger */ can be removed and Log *logrus.Entry could be put next to other variables of the same type

gnodeb/context/gnbcpue.go Show resolved Hide resolved
@@ -18,8 +18,7 @@ const GTP_U_PORT int = 2152

// GnbUpf holds the UPF context
type GnbUpf struct {
UpfAddr *net.UDPAddr
UpfIpString string
UpfAddr *net.UDPAddr
Copy link
Contributor

Choose a reason for hiding this comment

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

Something similar to my previous comment, why not putting variables of the same type together? For example:

	UpfAddr  *net.UDPAddr
	GnbUpUes *GnbUeDao
	Log      *logrus.Entry

gnodeb/context/gnbupue.go Show resolved Hide resolved
@patriciareinoso
Copy link
Contributor Author

Please taka look at the comments and let me know what you think... This is someting that could be done in several files because /* logger */ can be removed and Log *logrus.Entry could be put next to other variables of the same type

I am always eager to remove unnecessary comments. I moved all the log fields next to other pointers

@gab-arrobo
Copy link
Contributor

@patriciareinoso, please resolve conflicts. Thanks!

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)

@gab-arrobo gab-arrobo merged commit a4c8fb4 into omec-project:main Jan 31, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants