Initial Notifiers implementation

This commit is contained in:
mkelcik
2023-05-04 11:44:27 +02:00
parent 2d52cbe920
commit ffd5253f59
7 changed files with 211 additions and 8 deletions

View File

@@ -2,10 +2,10 @@ package internal
import "strings"
func parseDNSToCheck(data string) []string {
func parseCommaDelimited(data string) []string {
out := make([]string, 0, strings.Count(data, ",")+1)
for _, dns := range strings.Split(data, ",") {
if w := strings.TrimSpace(dns); w != "" {
for _, item := range strings.Split(data, ",") {
if w := strings.TrimSpace(item); w != "" {
out = append(out, w)
}
}