CloudSoda / go-smb2

Client implementation of the SMB 2 & 3 protocols
BSD 2-Clause "Simplified" License
12 stars 5 forks source link

Golint #12

Closed deitch closed 11 months ago

deitch commented 11 months ago

First commit adds golint action to the CI workflow. Second commit cleans up all of the lint errors.

In all cases, we endeavoured not to change the logic at all, including leaving unused vars or funcs, or ineffective assignment. Instead, we added //nolint comments, so we can track them and it passes CI.

Any of these always can be removed later, probably should, but in their own dedicated small PRs.

arashpayan commented 11 months ago

Thanks @deitch. Can you tell me why you exported the methods of spnegoClient? Was it just so it would be consistent with the Initiator interface or was there a bug left over from the Initiator interface changes in the previous MR?

deitch commented 11 months ago

It was partially for consistency, and partially because they weren't used anywhere, so the linter complained. The choices were remove them, add nolint comments, or export them. Since they matched the Initiator interface, that seemed the most logical route.

If there's a different approach, happy to change it.

arashpayan commented 11 months ago

That's a reasonable choice. Thanks for the clarification. 👍