diff --git a/cmd/install.go b/cmd/install.go index c21d506..defbaac 100644 --- a/cmd/install.go +++ b/cmd/install.go @@ -19,7 +19,7 @@ type installModel struct { pluginName string } -func installInitialModel(plugin mtvmplugin.Plugin, pluginName string, version string) installModel { +func installInitialModel(plugin mtvmplugin.Plugin, pluginName, version string) installModel { downloadModel := install.New(plugin, pluginName, version) return installModel{ installer: downloadModel, diff --git a/cmd/remove.go b/cmd/remove.go index 2dc145a..d044188 100644 --- a/cmd/remove.go +++ b/cmd/remove.go @@ -21,7 +21,7 @@ type removeModel struct { done bool } -func removeInitialModel(plugin mtvmplugin.Plugin, version string, tool string) removeModel { +func removeInitialModel(plugin mtvmplugin.Plugin, version, tool string) removeModel { spin := spinner.New() spin.Spinner = spinner.Dot return removeModel{ diff --git a/cmd/use.go b/cmd/use.go index 50b905f..0c9e086 100644 --- a/cmd/use.go +++ b/cmd/use.go @@ -25,7 +25,7 @@ type useInstallModel struct { version string } -func useInstallInitialModel(plugin mtvmplugin.Plugin, pluginName string, version string) useInstallModel { +func useInstallInitialModel(plugin mtvmplugin.Plugin, pluginName, version string) useInstallModel { installer := install.New(plugin, pluginName, version) spin := spinner.New() spin.Spinner = spinner.Dot diff --git a/components/install/install.go b/components/install/install.go index d166c0b..235f377 100644 --- a/components/install/install.go +++ b/components/install/install.go @@ -22,7 +22,7 @@ type Model struct { type InstalledMsg bool -func New(plugin mtvmplugin.Plugin, pluginName string, version string) Model { +func New(plugin mtvmplugin.Plugin, pluginName, version string) Model { progressChannel := make(chan float64) downloader := downloadProgress.New(progressChannel) downloader.Title = "Downloading..." @@ -53,7 +53,7 @@ func Download(plugin mtvmplugin.Plugin, version string, progressChannel chan flo } } -func Install(plugin mtvmplugin.Plugin, installDir string, pluginName string, version string) tea.Cmd { +func Install(plugin mtvmplugin.Plugin, installDir string, pluginName, version string) tea.Cmd { return func() tea.Msg { err := plugin.Install(filepath.Join(installDir, pluginName, version)) if err != nil { diff --git a/shared/shared.go b/shared/shared.go index a2562d9..f957038 100644 --- a/shared/shared.go +++ b/shared/shared.go @@ -19,7 +19,7 @@ type SuccessMsg string var CheckMark string = lipgloss.NewStyle().Foreground(lipgloss.Color("2")).SetString("✓").String() -func IsVersionInstalled(tool string, version string) (bool, error) { +func IsVersionInstalled(tool, version string) (bool, error) { _, err := os.Stat(filepath.Join(Configuration.InstallDir, tool, version)) if err != nil { if os.IsNotExist(err) {