Remove a few unnecessary parentheses

The new version of gofumpt that we are going to update to in a moment
would complain about these.
This commit is contained in:
Stefan Haller
2026-08-13 20:40:11 +02:00
parent fbe2379fa5
commit b1e9ac3969
3 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -50,13 +50,13 @@ type editPreset struct {
suspend func() bool
}
func returnBool(a bool) func() bool { return (func() bool { return a }) }
func returnBool(a bool) func() bool { return func() bool { return a } }
// IF YOU ADD A PRESET TO THIS FUNCTION YOU MUST UPDATE THE `Supported presets` SECTION OF docs/Config.md
func getPreset(shell string, osConfig *OSConfig, guessDefaultEditor func() string) *editPreset {
var nvimRemoteEditTemplate, nvimRemoteEditAtLineTemplate, nvimRemoteOpenDirInEditorTemplate string
// By default fish doesn't have SHELL variable set, but it does have FISH_VERSION since Nov 2012.
if (strings.HasSuffix(shell, "fish")) || (os.Getenv("FISH_VERSION") != "") {
if strings.HasSuffix(shell, "fish") || (os.Getenv("FISH_VERSION") != "") {
nvimRemoteEditTemplate = `begin; if test -z "$NVIM"; nvim -- {{filename}}; else; nvim --server "$NVIM" --remote-send "q"; nvim --server "$NVIM" --remote-tab {{filename}}; end; end`
nvimRemoteEditAtLineTemplate = `begin; if test -z "$NVIM"; nvim +{{line}} -- {{filename}}; else; nvim --server "$NVIM" --remote-send "q"; nvim --server "$NVIM" --remote-tab {{filename}}; nvim --server "$NVIM" --remote-send ":{{line}}<CR>"; end; end`
nvimRemoteOpenDirInEditorTemplate = `begin; if test -z "$NVIM"; nvim -- {{dir}}; else; nvim --server "$NVIM" --remote-send "q"; nvim --server "$NVIM" --remote-tab {{dir}}; end; end`
+4 -4
View File
@@ -300,15 +300,15 @@ func (g *Gui) pollEvent() GocuiEvent {
if g.playRecording {
select {
case ev := <-g.replayedEvents.Keys:
tev = (ev).toTcellEvent()
tev = ev.toTcellEvent()
task = ev.task
case ev := <-g.replayedEvents.Resizes:
tev = (ev).toTcellEvent()
tev = ev.toTcellEvent()
case ev := <-g.replayedEvents.MouseEvents:
tev = (ev).toTcellEvent()
tev = ev.toTcellEvent()
task = ev.task
case ev := <-g.replayedEvents.FocusEvents:
tev = (ev).toTcellEvent()
tev = ev.toTcellEvent()
task = ev.task
}
} else {
+1 -1
View File
@@ -20,7 +20,7 @@ type Game struct {
exit chan (struct{})
// channel for specifying the direction the player wants the snake to go in
setNewDir chan (Direction)
setNewDir chan Direction
// allows logging for debugging
logger func(string)