Skip to content

Commit

Permalink
format the code
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyYe committed Nov 26, 2024
1 parent 82d460e commit 59192c6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/handler/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,10 @@ func (handler *Handler) UpdateIP(domain *settings.Domain) error {

func (handler *Handler) updateDNS(domain *settings.Domain, ip string) error {
var updatedDomains []string
for _, subdomainName := range domain.SubDomains {

for _, subdomainName := range domain.SubDomains {
var hostname string

if subdomainName != utils.RootDomain {
hostname = subdomainName + "." + domain.DomainName
} else {
Expand All @@ -119,7 +120,7 @@ func (handler *Handler) updateDNS(domain *settings.Domain, ip string) error {
continue
}

//check against the current known IP, if no change, skip update
// check against the current known IP, if no change, skip update
if ip == lastIP {
log.Infof("IP is the same as cached one (%s). Skip update.", ip)
} else {
Expand Down

0 comments on commit 59192c6

Please sign in to comment.