fix: resolve funcorder lint issues
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user