I'm very new to golang, I have some experience with python but not on this level per say. I am creating an application that's called "digall", making it easy for a user to see active dns-records when checking a domain name.

LookupSRV
    func srvRecord(query string) {
        service := "sipfederationtls"
        protocol:= "tcp"
        fmt.Printf("\n[+] SRV Record(s)\n")
        //srvMap := ["sipfederationtls", "autodiscover", "VLMCS"]
        cname, addresses, err := net.LookupSRV(service, protocol, query)

        if err != nil {
                fmt.Printf("[!] This feature is currently under development, thus not ready yet.\n")
        }

        fmt.Printf("cname : %s \n", cname)

        for i := 0; i < len(addresses); i++ {
                fmt.Printf("addrs[%d].Target : %s \n", i, addresses[i].Target)
                fmt.Printf("addrs[%d].Port : %d \n", i, addresses[i].Port)
                fmt.Printf("addrs[%d].Priority : %d \n", i, addresses[i].Priority)
                fmt.Printf("addrs[%d].Weight : %d \n", i, addresses[i].Weight)
        }
}

As you can see the variable "service" serves as the prefix of the SRV record. My only problem is that i want to check multiple prefixes of this record, namely "sipfederationtls", "autodiscover" and "VLMCS".

What I am asking is; How to i make this function swift through these prefixes and return the ones that work? (the ones that error out will be handled by err by my fantastic error message)

I am aware that this is a noob question, and like I said I am very new to golang. I would appreciate any tips you guys could give me.

Here is the full source of the application: http://dpaste.com/3X24ZYR

Thank you.