syslog filter could take several filters
This commit is contained in:
parent
04ada45f44
commit
69594c2fe4
4 changed files with 48 additions and 23 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue