Skip to content

Commit

Permalink
Add a bit documentation and simplifications
Browse files Browse the repository at this point in the history
  • Loading branch information
markelog committed Jul 26, 2018
1 parent 4d7448f commit e5f579f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions cmd/info/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ func AskRemoteVersion(language string) (version string, err error) {
return
}

// PossibleLanguage gets the most possible language that user probably meant
func PossibleLanguage(args []string) (language string) {
for _, element := range args {
data := strings.Split(element, "@")
Expand Down
2 changes: 2 additions & 0 deletions cmd/print/print.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ func Download(response *grab.Response, version string) string {
return response.Filename
}

// Greens prints stuff in green
func Green(msg string) {
fmt.Println()
fmt.Println(ansi.Color("> ", "green") + msg)
Expand All @@ -184,6 +185,7 @@ func Warning(note, command string) {
}
}

// ClosestLangWarning prints error message for the similar typed language
func ClosestLangWarning(language, closest string) {
incorrectOne := ansi.Color(language, "red")

Expand Down
2 changes: 1 addition & 1 deletion plugins/golang/golang.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var (
// DownloadLink from which we download binaries for golang
DownloadLink = "https://storage.googleapis.com/golang"

versionPattern = "\\d+\\.\\d+(?:\\.\\d+)?(?:(alpha|beta|rc)(?:\\d*)?)?"
versionPattern = `\d+\.\d+(?:\.\d+)?(?:(alpha|beta|rc)(?:\d*)?)?`

bins = []string{"go", "godoc", "gofmt"}
dots = []string{".go-version"}
Expand Down
1 change: 1 addition & 0 deletions shell/shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func (shell *Shell) Initiate() (err error) {
return
}

// Remove some text from the shell config file
func (shell *Shell) Remove() (err error) {
err = shell.rc.Remove()
if err != nil {
Expand Down

0 comments on commit e5f579f

Please sign in to comment.