dnscontrol/pkg/rejectif/label.go

19 lines
362 B
Go
Raw Normal View History

package rejectif
import (
"fmt"
2023-05-21 01:21:45 +08:00
"github.com/StackExchange/dnscontrol/v4/models"
)
// Keep these in alphabetical order.
// LabelNotApex detects use not at apex. Use this when a record type
// is only permitted at the apex.
func LabelNotApex(rc *models.RecordConfig) error {
if rc.GetLabel() != "@" {
return fmt.Errorf("use not at apex")
}
return nil
}