mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-25 09:24:04 +01:00
Minor update
This commit is contained in:
parent
faff3dc8de
commit
3a13dce3f0
@ -10,7 +10,7 @@ import (
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
// ErrDNSWithNoQueryName is the error with which gatus will panic if a dns is configured without query name
|
// ErrDNSWithNoQueryName is the error with which gatus will panic if a dns is configured without query name
|
||||||
ErrDNSWithNoQueryName = errors.New("you must specify query name for DNS")
|
ErrDNSWithNoQueryName = errors.New("you must specify a query name for DNS")
|
||||||
// ErrDNSWithInvalidQueryType is the error with which gatus will panic if a dns is configured with invalid query type
|
// ErrDNSWithInvalidQueryType is the error with which gatus will panic if a dns is configured with invalid query type
|
||||||
ErrDNSWithInvalidQueryType = errors.New("invalid query type")
|
ErrDNSWithInvalidQueryType = errors.New("invalid query type")
|
||||||
)
|
)
|
||||||
@ -30,7 +30,6 @@ func (d *DNS) validateAndSetDefault() {
|
|||||||
if len(d.QueryName) == 0 {
|
if len(d.QueryName) == 0 {
|
||||||
panic(ErrDNSWithNoQueryName)
|
panic(ErrDNSWithNoQueryName)
|
||||||
}
|
}
|
||||||
|
|
||||||
if !strings.HasSuffix(d.QueryName, ".") {
|
if !strings.HasSuffix(d.QueryName, ".") {
|
||||||
d.QueryName += "."
|
d.QueryName += "."
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user