Use regexp.MustCompile instead of Compile ignoring err

This commit is contained in:
Daniel Martí 2015-03-06 14:02:01 +01:00
parent 830fe1ba8f
commit a4a368613a
1 changed files with 2 additions and 2 deletions

View File

@ -29,8 +29,8 @@ func NewRegistrationAuthorityImpl() RegistrationAuthorityImpl {
return RegistrationAuthorityImpl{} return RegistrationAuthorityImpl{}
} }
var dnsLabelRegexp, _ = regexp.Compile("^[a-zA-Z0-9-]*$") var dnsLabelRegexp = regexp.MustCompile("^[a-zA-Z0-9-]*$")
var ipAddressRegexp, _ = regexp.Compile("^[0-9.]*$") var ipAddressRegexp = regexp.MustCompile("^[0-9.]*$")
func forbiddenIdentifier(id string) bool { func forbiddenIdentifier(id string) bool {
// A DNS label is a part separated by dots, e.g. www.foo.net has labels // A DNS label is a part separated by dots, e.g. www.foo.net has labels