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() { func init() {
if runtime.GOOS == "windows" { if runtime.GOOS == "windows" {
editor = "notepad" editor = "notepad"
} } else if g := os.Getenv("GIT_EDITOR"); g != "" {
if g := os.Getenv("GIT_EDITOR"); g != "" {
editor = g editor = g
} } else if v := os.Getenv("VISUAL"); v != "" {
if v := os.Getenv("VISUAL"); v != "" {
editor = v editor = v
} } else if e := os.Getenv("EDITOR"); e != "" {
if e := os.Getenv("EDITOR"); e != "" {
editor = e editor = e
} }
} }