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

Lint and vet #48

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

Lint and vet #48

wants to merge 14 commits into from

Conversation

olabiniV2
Copy link
Contributor

This PR fixes all go vet issues and golint issues identified in the code base (except for the ones in the generated code). These issues are all minor changes to naming or to structure to make them conform to Golang coding standards.

Copy link
Contributor

@actown actown left a comment

Choose a reason for hiding this comment

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

Can you please remove pkg/mumbleproto/Mumble.pb.go from the PR? This file should be generated from the generate script within the mumbleproto directory.

@@ -265,36 +269,36 @@ func (client *Client) readProtoMessage() (msg *Message, err error) {
}

// Send permission denied by type
func (c *Client) sendPermissionDeniedType(denyType mumbleproto.PermissionDenied_DenyType) {
c.sendPermissionDeniedTypeUser(denyType, nil)
func (client *Client) sendPermissionDeniedType(denyType mumbleproto.PermissionDenied_DenyType) {
Copy link

Choose a reason for hiding this comment

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

c is fine, no need to change that

// Merge the contents of a frozen User into an existing user struct.
func (u *User) Unfreeze(fu *freezer.User) {
// Unfreeze will merge the contents of a frozen User into an existing user struct.
func (user *User) Unfreeze(fu *freezer.User) {
Copy link

Choose a reason for hiding this comment

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

ditto

func (s *Server) SendUDP(buf []byte, addr *net.UDPAddr) (err error) {
_, err = s.udpconn.WriteTo(buf, addr)
// SendUDP will send the content of buf as a UDP packet to addr.
func (server *Server) SendUDP(buf []byte, addr *net.UDPAddr) (err error) {
Copy link

Choose a reason for hiding this comment

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

ditto

// iterating the transaction groups of an
// immutable Log.
type Walker struct {
r io.Reader
}

// Type txReader imlpements a checksumming reader, intended
// txReader imlpements a checksumming reader, intended
Copy link

Choose a reason for hiding this comment

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

s/imlpements/implements/

@delthas
Copy link

delthas commented May 4, 2020

Can you please remove pkg/mumbleproto/Mumble.pb.go from the PR? This file should be generated from the generate script within the mumbleproto directory.

Same for pkg/freezer/types.{proto,pb.go}

@delthas
Copy link

delthas commented May 4, 2020

Squashing all commits would also make sense.

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.

None yet

3 participants