Skip to content

Commit

Permalink
fix: lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
gchiesa committed Jul 26, 2024
1 parent e6fe3d8 commit a68751a
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 15 deletions.
2 changes: 2 additions & 0 deletions .golang-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ linters-settings:
- singleCaseSwitch
- hugeParam
- appendCombine
- sloppyReassign
- whyNoLint
funlen:
lines: 100
statements: 52
Expand Down
9 changes: 0 additions & 9 deletions cmd/util.go

This file was deleted.

4 changes: 2 additions & 2 deletions internal/tui/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (m *Model) Init() tea.Cmd {
}

func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
var cmds []tea.Cmd = make([]tea.Cmd, len(m.inputs))
var cmds = make([]tea.Cmd, len(m.inputs))

for i := range m.inputs {
m.inputs[i], cmds[i] = m.inputs[i].Update(msg)
Expand Down Expand Up @@ -84,7 +84,7 @@ func (m *Model) View() string {
builder.WriteRune('\n')
builder.WriteString(helpStyle.Render(" ↑, ↓: navigate, enter: confirm, ctrl+c: quit, ctrl+s: save"))
if m.err != nil {
builder.WriteString(errorStyle.Render(fmt.Sprintf("%s", m.err.Error())))
builder.WriteString(errorStyle.Render(m.err.Error()))
}
return builder.String()
}
Expand Down
2 changes: 0 additions & 2 deletions internal/tui/type.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
package tui

import (
"github.com/charmbracelet/bubbles/cursor"
"github.com/charmbracelet/bubbles/textinput"
)

type Model struct {
header string
focusIndex int
inputs []textinput.Model
cursorMode cursor.Mode
err error
exitWithCtrlC bool
}
2 changes: 1 addition & 1 deletion pkg/skaffolder/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type SkaCreate struct {
Log *log.Entry
}

func NewSkaCreate(templateURI string, destinationPath string, variables map[string]string) *SkaCreate {
func NewSkaCreate(templateURI, destinationPath string, variables map[string]string) *SkaCreate {
logCtx := log.WithFields(log.Fields{
"pkg": "skaffolder",
})
Expand Down
1 change: 0 additions & 1 deletion pkg/skaffolder/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ func (s *SkaUpdate) Update() error {

// check if interactive mode is required
if interactiveService.ShouldRun() {

// overrides the variables from remote service with already saved variables
interactiveService.SetDefaults(mapInterfaceToString(vars))

Expand Down

0 comments on commit a68751a

Please sign in to comment.