mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-01-11 01:47:53 +08:00
a3934e7b35
Co-authored-by: Tom Limoncelli <tal@whatexit.org>
18 lines
362 B
Go
18 lines
362 B
Go
package rejectif
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/StackExchange/dnscontrol/v3/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
|
|
}
|