syslog filter could take several filters

This commit is contained in:
nemunaire 2026-01-01 22:37:02 +07:00
commit 69594c2fe4
4 changed files with 48 additions and 23 deletions

View file

@ -1,9 +1,27 @@
package config
import (
"fmt"
"net/url"
)
// StringArray is a custom type for handling multiple string values in flags.
type StringArray struct {
Array *[]string
}
// String returns a string representation of the StringArray.
func (i *StringArray) String() string {
return fmt.Sprintf("%v", i.Array)
}
// Set appends a new string value to the StringArray.
func (i *StringArray) Set(value string) error {
*i.Array = append(*i.Array, value)
return nil
}
type URL struct {
URL *url.URL
}