15 lines
246 B
Go
15 lines
246 B
Go
package main
|
|
|
|
import "regexp"
|
|
|
|
func resolveName(name string) string {
|
|
r := regexp.MustCompile(`^well-known.252.no/(.+)$`)
|
|
if !r.MatchString(name) {
|
|
return ""
|
|
}
|
|
m := r.FindStringSubmatch(name)
|
|
if len(m) != 2 {
|
|
return ""
|
|
}
|
|
return m[1]
|
|
}
|