mirror of
https://github.com/prymitive/karma
synced 2026-05-11 03:46:48 +00:00
17 lines
382 B
Go
17 lines
382 B
Go
package filters
|
|
|
|
import (
|
|
"github.com/prymitive/unsee/internal/models"
|
|
)
|
|
|
|
type autocompleteFactory func(name string, operators []string, alerts []models.Alert) []models.Autocomplete
|
|
|
|
func makeAC(value string, tokens []string) models.Autocomplete {
|
|
acHint := models.Autocomplete{
|
|
Value: value,
|
|
Tokens: tokens,
|
|
}
|
|
acHint.Tokens = append(acHint.Tokens, value)
|
|
return acHint
|
|
}
|