Use if/else/if instead
This commit is contained in:
parent
1a65c9bb6d
commit
4a5135d820
1 changed files with 3 additions and 6 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue