Skip to content

Commit

Permalink
fix: lint issues
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Alexandro Becker <[email protected]>
  • Loading branch information
caarlos0 committed Jun 30, 2023
1 parent e707484 commit a337c82
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
4 changes: 0 additions & 4 deletions .golangci-soft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,13 @@ issues:

linters:
enable:
# - dupl
- exhaustive
# - exhaustivestruct
- goconst
- godot
- godox
- gomnd
- gomoddirectives
- goprintffuncname
- ifshort
# - lll
- misspell
- nakedret
- nestif
Expand Down
3 changes: 1 addition & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/log"
"github.com/muesli/termenv"
"golang.org/x/crypto/ssh"
gossh "golang.org/x/crypto/ssh"
)

Expand Down Expand Up @@ -66,7 +65,7 @@ func shellAndWait(session *gossh.Session) error {
return fmt.Errorf("failed to start shell: %w", err)
}
if err := session.Wait(); err != nil {
if errors.Is(err, &ssh.ExitMissingError{}) {
if errors.Is(err, &gossh.ExitMissingError{}) {
log.Info("exit was missing, assuming exit 0")
return nil
}
Expand Down
6 changes: 3 additions & 3 deletions cmd/wishlist/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ It's also possible to serve the TUI over SSH using the server command.
CompletionOptions: cobra.CompletionOptions{
HiddenDefaultCmd: true,
},
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, args []string) error {
cache, err := os.UserCacheDir()
if err != nil {
return fmt.Errorf("could not create log file: %w", err)
Expand Down Expand Up @@ -92,7 +92,7 @@ var manCmd = &cobra.Command{
Short: "generate man pages",
Hidden: true,
SilenceUsage: true,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
manPage, err := mcobra.NewManPage(1, rootCmd)
if err != nil {
return fmt.Errorf("could not generate man pages: %w", err)
Expand All @@ -109,7 +109,7 @@ var serverCmd = &cobra.Command{
Aliases: []string{"server", "s"},
Args: cobra.NoArgs,
Short: "Serve the TUI over SSH.",
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
seed, err := getSeedEndpoints()
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ type EndpointHint struct {
}

// Authentications returns either the client preferred authentications or the
// default publickey,keyboard-interactive
// default publickey,keyboard-interactive.
func (e Endpoint) Authentications() []string {
if len(e.PreferredAuthentications) == 0 {
return []string{authModePublicKey, authModeKeyboardInteractive}
Expand Down

0 comments on commit a337c82

Please sign in to comment.