Use if/else/if instead

This commit is contained in:
Ahmed El Gabri 2020-02-12 23:07:36 +01:00
parent 1a65c9bb6d
commit 4a5135d820
No known key found for this signature in database
GPG key ID: CE3F2CD86B651AC4

View file

@ -25,14 +25,11 @@ var (
func init() {
if runtime.GOOS == "windows" {
editor = "notepad"
}
if g := os.Getenv("GIT_EDITOR"); g != "" {
} else if g := os.Getenv("GIT_EDITOR"); g != "" {
editor = g
}
if v := os.Getenv("VISUAL"); v != "" {
} else if v := os.Getenv("VISUAL"); v != "" {
editor = v
}
if e := os.Getenv("EDITOR"); e != "" {
} else if e := os.Getenv("EDITOR"); e != "" {
editor = e
}
}