package fluentd import ( "strconv" "strings" ) func ParseAddr(addr string) (string, int) { p := strings.Split(addr, ":") fHost := p[0] fPort, _ := strconv.Atoi(p[1]) return fHost, fPort }