diff --git a/types/zone.go b/types/zone.go index 13d0671..0eec776 100644 --- a/types/zone.go +++ b/types/zone.go @@ -7,15 +7,15 @@ import ( type ( // Zone represents the name of a zone. A zone must end with a `.`. - Zone string + ZoneName string ) -func (z *Zone) UnmarshalJSON(in []byte) error { +func (z *ZoneName) UnmarshalJSON(in []byte) error { in = bytes.Trim(in, `"`) if in[len(in)-1] != '.' { return fmt.Errorf("not a valid zone name") } - *z = Zone(in) + *z = ZoneName(in) return nil }