Skip to content

Commit

Permalink
A bit of lint
Browse files Browse the repository at this point in the history
  • Loading branch information
markelog committed Aug 31, 2018
1 parent 4a5a3c1 commit 333e3ec
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 65 deletions.
24 changes: 0 additions & 24 deletions cmd/commands/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,6 @@ import (
"github.com/spf13/cobra"
)

// Is action remote?
var isRemote bool

// Is action local?
var isLocal bool

// Reinstall global modules from previous version?
var withModules bool

var use = "ec [<language>@<version>]"

// Command config
Expand Down Expand Up @@ -51,21 +42,6 @@ func init() {
cobra.OnInitialize()
}

func isLanguageRelated(name string, args []string) bool {
if hasHelp(args) {
return false
}

names := []string{"ec", "ls", "rm"}
for _, elem := range names {
if elem == name {
return len(args) != 0
}
}

return false
}

func augment() {
// Insert command "install" in args
os.Args = append(os.Args[:1], append([]string{"install"}, os.Args[1:]...)...)
Expand Down
2 changes: 0 additions & 2 deletions cmd/info/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ import (
"github.com/markelog/eclectica/cmd/print/spinner"
)

type prefixFn func()

// Ask for language and version from the user
func Ask() (language, version string, err error) {
fmt.Println()
Expand Down
9 changes: 0 additions & 9 deletions list/list.go
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
package list

import (
"regexp"
"strings"

"github.com/markelog/list"
)

var (
escapeReg = regexp.MustCompile(`[|\\{}()[\]^$+*?.]`)
)

func escape(str string) string {
return escapeReg.ReplaceAllString(str, "")
}

// List the plugins
func List(header string, options []string, indent int) string {
strIndent := ""
Expand Down
15 changes: 0 additions & 15 deletions plugins/plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -626,21 +626,6 @@ func (plugin *Plugin) removeProxy() (err error) {
return nil
}

func (plugin *Plugin) removeSupport() (err error) {
bins := plugin.Bins()

for _, bin := range bins {
proxy := filepath.Join(variables.DefaultInstall, bin)

err = os.RemoveAll(proxy)
if err != nil {
return
}
}

return nil
}

// SearchBin searches for the actual binary
func SearchBin(name string) string {
bins := map[string][]string{}
Expand Down
10 changes: 0 additions & 10 deletions plugins/python/python.go
Original file line number Diff line number Diff line change
Expand Up @@ -557,13 +557,3 @@ func hasTools(version string) bool {

return semverVersion.Compare(pipAvailable) != -1
}

func checkErrors(out []byte) (err error) {
output := string(out)

if strings.Contains(output, "Traceback") {
err = errors.New(output)
}

return err
}
5 changes: 0 additions & 5 deletions plugins/ruby/bin/bin.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ var (

// VersionLink is the URL link from which we can get all possible versions
VersionLink = "https://rvm.io/binaries"

versionPattern = `\d+\.\d+\.\d`

bins = []string{"erb", "gem", "irb", "rake", "rdoc", "ri", "ruby"}
dots = []string{".ruby-version"}
)

// Ruby bin essential struct
Expand Down

0 comments on commit 333e3ec

Please sign in to comment.