Commit
This commit is contained in:
15
internal/app/config/other.go
Normal file
15
internal/app/config/other.go
Normal file
@ -0,0 +1,15 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
type KVPair map[string]string
|
||||
|
||||
func (kvp *KVPair) Set(str string) {
|
||||
kvps := strings.Split(str, ",")
|
||||
for _, i := range kvps {
|
||||
kv := strings.SplitN(i, "=", 2)
|
||||
(*kvp)[kv[0]] = kv[1]
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user