Remove panic-prone optional beep helpers

This commit is contained in:
Brandon McGinty (chatgpt)
2026-08-09 14:29:34 -04:00
committed by Brandon McGinty
parent 51d62c3acb
commit c3fe4f88f3
3 changed files with 1 additions and 27 deletions
+1 -1
View File
@@ -261,7 +261,7 @@ Priority 3: configuration, UI, and binding hardening
Add checked wrapper operations for lifecycle-critical calls and surface
actionable errors to Barnard.
34. Beep helpers panic when the external command is absent
[x] 34. Beep helpers panic when the external command is absent
Files: ui.go, gumble/gumbleopenal/stream.go
Both helpers panic on exec failure. Return/log an error or remove unused
helpers; a missing optional beep binary must not terminate Barnard.
-11
View File
@@ -4,7 +4,6 @@ import (
"encoding/binary"
"errors"
"math"
"os/exec"
"runtime"
"sync"
"sync/atomic"
@@ -46,16 +45,6 @@ var (
ErrOutputDevice = errors.New("gumbleopenal: invalid output device or parameters")
)
func beep() {
cmd := exec.Command("beep")
cmdout, err := cmd.Output()
if err != nil {
panic(err)
}
if cmdout != nil {
}
}
type renderCommand struct {
fn func()
done chan struct{}
-15
View File
@@ -3,7 +3,6 @@ package main
import (
"fmt"
"os"
"os/exec"
"strings"
"time"
@@ -24,16 +23,6 @@ const (
uiViewAdmin = "admin"
)
func Beep() {
cmd := exec.Command("beep")
cmdout, err := cmd.Output()
if err != nil {
panic(err)
}
if cmdout != nil {
}
}
func esc(str string) string {
return sanitize.HTML(str)
}
@@ -42,10 +31,6 @@ func (b *Barnard) Notify(event string, who string, what string) {
b.notifyChannel <- []string{event, who, what}
}
func (b *Barnard) Beep() {
Beep()
}
func (b *Barnard) SetSelectedUser(user *gumble.User) {
b.selectedUser = user
if user == nil {