Fix linter warnings in command package
Summary
This MR resolves all linter warnings reported in the command package and related files.
Changes
internal/command/command.go
- Added package comment describing the command package purpose
- Added comments for exported types:
Command,LogMetadata,LogData - Added comment for
CheckForVersionFlagfunction - Fixed
Setupfunction comment to follow Go conventions (removed parentheses) - Added comment for
NewLogDatafunction - Fixed errcheck warning by explicitly ignoring
closer.Close()error with_ = closer.Close()
internal/command/readwriter/readwriter.go
- Added package comment
- Added comment for
ReadWritertype
internal/command/receivepack/gitalycall_test.go
- Renamed struct field
keyIdtokeyIDto follow Go naming conventions - Fixed testifylint warning by reversing expected/actual values in
require.Equal
internal/command/lfsauthenticate/lfsauthenticate.go
- Fixed errcheck warning by handling
fmt.Fprintferror return value
internal/command/githttp/pull.go and push.go
- Extracted duplicate SSH request handling code into a shared
executeSSHRequesthelper function - This resolves the dupl linter warning about duplicate code blocks