1
0
mirror of https://github.com/taigrr/godns synced 2025-01-18 04:03:25 -08:00

fix lint warnings

This commit is contained in:
TimothyYe
2019-01-22 20:35:45 +08:00
parent 57b3c4c79d
commit dc376d91b4
6 changed files with 31 additions and 30 deletions

View File

@@ -76,6 +76,7 @@ func getHTTPBody(url string) ([]byte, error) {
return nil, fmt.Errorf("Status %d, Error:%s", resp.StatusCode, body)
}
// NewAliDNS function creates instance of AliDNS and return
func NewAliDNS(key, secret string) *AliDNS {
once.Do(func() {
instance = &AliDNS{

View File

@@ -9,18 +9,18 @@ import (
"github.com/TimothyYe/godns"
)
// AliDNSHandler struct
type AliDNSHandler struct {
// Handler struct
type Handler struct {
Configuration *godns.Settings
}
// SetConfiguration pass dns settings and store it to handler instance
func (handler *AliDNSHandler) SetConfiguration(conf *godns.Settings) {
func (handler *Handler) SetConfiguration(conf *godns.Settings) {
handler.Configuration = conf
}
// DomainLoop the main logic loop
func (handler *AliDNSHandler) DomainLoop(domain *godns.Domain, panicChan chan<- godns.Domain) {
func (handler *Handler) DomainLoop(domain *godns.Domain, panicChan chan<- godns.Domain) {
defer func() {
if err := recover(); err != nil {
log.Printf("Recovered in %v: %v\n", err, debug.Stack())