mirror of
https://github.com/taigrr/godns
synced 2025-01-18 04:03:25 -08:00
fix lint warnings
This commit is contained in:
@@ -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{
|
||||
|
||||
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user