mirror of
https://github.com/joohoi/acme-dns.git
synced 2025-07-11 00:07:57 +07:00
Moved global vars to types.go
This commit is contained in:
9
main.go
9
main.go
@ -7,15 +7,6 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DNSConf is global configuration struct
|
|
||||||
var DNSConf DNSConfig
|
|
||||||
|
|
||||||
// DB is used to access the database functions in acme-dns
|
|
||||||
var DB database
|
|
||||||
|
|
||||||
// RR holds the static DNS records
|
|
||||||
var RR Records
|
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// Read global config
|
// Read global config
|
||||||
configTmp := readConfig("config.cfg")
|
configTmp := readConfig("config.cfg")
|
||||||
|
9
types.go
9
types.go
@ -7,6 +7,15 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// DNSConf is global configuration struct
|
||||||
|
var DNSConf DNSConfig
|
||||||
|
|
||||||
|
// DB is used to access the database functions in acme-dns
|
||||||
|
var DB database
|
||||||
|
|
||||||
|
// RR holds the static DNS records
|
||||||
|
var RR Records
|
||||||
|
|
||||||
// Records is for static records
|
// Records is for static records
|
||||||
type Records struct {
|
type Records struct {
|
||||||
Records map[uint16]map[string][]dns.RR
|
Records map[uint16]map[string][]dns.RR
|
||||||
|
Reference in New Issue
Block a user