fix: resolve funcorder lint issues

This commit is contained in:
user
2026-02-20 03:22:03 -08:00
parent 2c89b23bea
commit a3c26c415e
2 changed files with 58 additions and 57 deletions

View File

@@ -196,6 +196,22 @@ func (ui *UI) SetStatus(nick, target, connStatus string) {
})
}
// BufferCount returns the number of buffers.
func (ui *UI) BufferCount() int {
return len(ui.buffers)
}
// BufferIndex returns the index of a named buffer, or -1.
func (ui *UI) BufferIndex(name string) int {
for i, buf := range ui.buffers {
if buf.Name == name {
return i
}
}
return -1
}
func (ui *UI) refreshStatus() {
// Will be called from the main goroutine via QueueUpdateDraw parent.
// Rebuild status from app state — caller must provide context.
@@ -234,19 +250,3 @@ func (ui *UI) getOrCreateBuffer(name string) *Buffer {
return buf
}
// BufferCount returns the number of buffers.
func (ui *UI) BufferCount() int {
return len(ui.buffers)
}
// BufferIndex returns the index of a named buffer, or -1.
func (ui *UI) BufferIndex(name string) int {
for i, buf := range ui.buffers {
if buf.Name == name {
return i
}
}
return -1
}