gofmt
This commit is contained in:
parent
4ddfe9e5c4
commit
9b3a71e39c
1 changed files with 27 additions and 31 deletions
|
@ -25,7 +25,7 @@ const (
|
|||
DelegatedDomainSuffix = "srs.p0m.fr."
|
||||
)
|
||||
|
||||
var tsigSecret = map[string]string{"ddns.": ""}
|
||||
var tsigSecret = map[string]string{"ddns.": "so6ZGir4GPAqINNh9U5c3A=="}
|
||||
|
||||
func init() {
|
||||
router.GET("/api/adomains/", apiAuthHandler(func(student Student, ps httprouter.Params, body []byte) (interface{}, error) {
|
||||
|
@ -169,7 +169,7 @@ func parseKnotZoneRead(globalDomain string, domain string) (rr []Entry, err erro
|
|||
return
|
||||
}
|
||||
|
||||
func (student Student) myAssociatedDomain() (string) {
|
||||
func (student Student) myAssociatedDomain() string {
|
||||
return fmt.Sprintf("%s.%s", strings.Trim(strings.Replace(student.Login, "_", "-", -1), "-_"), AssociatedDomainSuffix)
|
||||
}
|
||||
|
||||
|
@ -242,8 +242,7 @@ func (student Student) AddAssociatedDomains() (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
|
||||
func (student Student) MyDelegatedDomain() (string) {
|
||||
func (student Student) MyDelegatedDomain() string {
|
||||
return fmt.Sprintf("%s.%s", strings.Trim(strings.Replace(student.Login, "_", "-", -1), "-_"), DelegatedDomainSuffix)
|
||||
}
|
||||
|
||||
|
@ -316,7 +315,6 @@ func (student Student) UpdateNSDelegatedDomain(dn string, ttl uint32, oldns stri
|
|||
return
|
||||
}
|
||||
|
||||
|
||||
func (student Student) AddGLUEDelegatedDomain(dn string, ttl uint32, aaaa string) (err error) {
|
||||
domains := []string{student.MyDelegatedDomain()}
|
||||
found := false
|
||||
|
@ -383,7 +381,6 @@ func (student Student) UpdateGLUEDelegatedDomain(dn string, ttl uint32, oldaaaa
|
|||
return
|
||||
}
|
||||
|
||||
|
||||
func (student Student) AddDSDelegatedDomain(dn string, ttl uint32, rdata string) (err error) {
|
||||
dnskey := strings.Split(rdata, " ")
|
||||
|
||||
|
@ -457,7 +454,6 @@ func (student Student) UpdateDSDelegatedDomain(dn string, ttl uint32, oldds stri
|
|||
return
|
||||
}
|
||||
|
||||
|
||||
func (student Student) DeleteRRDelegatedDomain(dn string, rr string, values ...string) (err error) {
|
||||
domains := []string{student.MyDelegatedDomain()}
|
||||
found := false
|
||||
|
|
Reference in a new issue