initial commit
This commit is contained in:
commit
5ba52dd285
19 files changed
+639
No files matched your search
@@ -0,0 +1,23 @@
|
||||
package utils
|
||||
|
||||
import "strings"
|
||||
|
||||
func DecodeResolvs(input string) []string {
|
||||
var result []string
|
||||
pairs := strings.SplitSeq(input, "\n")
|
||||
|
||||
for pair := range pairs {
|
||||
if pair == "" {
|
||||
continue
|
||||
}
|
||||
kv := strings.SplitN(pair, " ", 2)
|
||||
if len(kv) != 2 {
|
||||
continue
|
||||
}
|
||||
value := strings.TrimSpace(kv[1])
|
||||
if value != "" {
|
||||
result = append(result, value)
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
Reference in new issue
Block a user