mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
Revert "CLEANUP: Fix many golint/staticcheck issues"
This reverts commit de64f90c51
.
This commit is contained in:
@@ -181,7 +181,6 @@ func getCertInfo(pemBytes []byte) (names []string, remaining float64, err error)
|
||||
if err != nil {
|
||||
return nil, 0, err
|
||||
}
|
||||
// FIXME(tlim): should use time.Until instead of t.Sub(time.Now()) (S1024)
|
||||
var daysLeft = float64(cert.NotAfter.Sub(time.Now())) / float64(time.Hour*24)
|
||||
return cert.DNSNames, daysLeft, nil
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
_ "embed" // Used to embed helpers.js in the binary.
|
||||
_ "embed"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
|
@@ -497,14 +497,14 @@ func processSplitHorizonDomains(config *models.DNSConfig) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
//// parseDomainSpec parses "domain.tld!tag" into its component parts.
|
||||
//func parseDomainSpec(s string) (domain, tag string) {
|
||||
// l := strings.SplitN(s, "!", 2)
|
||||
// if len(l) == 2 {
|
||||
// return l[0], l[1]
|
||||
// }
|
||||
// return l[0], ""
|
||||
//}
|
||||
// parseDomainSpec parses "domain.tld!tag" into its component parts.
|
||||
func parseDomainSpec(s string) (domain, tag string) {
|
||||
l := strings.SplitN(s, "!", 2)
|
||||
if len(l) == 2 {
|
||||
return l[0], l[1]
|
||||
}
|
||||
return l[0], ""
|
||||
}
|
||||
|
||||
func checkAutoDNSSEC(dc *models.DomainConfig) (errs []error) {
|
||||
if dc.AutoDNSSEC != "" && dc.AutoDNSSEC != "on" && dc.AutoDNSSEC != "off" {
|
||||
|
Reference in New Issue
Block a user