func NewGoCfg(fname string, logger *dns.Logger) (c *GoCfg, err error) {
	x := &GoCfg{}
	if x.cfg, err = NewCfg(fname, logger); err != nil {
		return
	}

	x.rq = make(chan bool, 10)
	x.re = make(chan *goCfgMsg, 10)
	c = x
	go func() {
		for {
			<-c.rq // wait for rq
			msg := &goCfgMsg{}
			msg.f, msg.changed, msg.error = c.cfg.Conf()
			c.re <- msg // return response
		}
	}()
	return
}
// NewGoCfg returns a newly created GoCfg or an Error if any.
// It is assumed there will be only one/few GoCfg instance(s) in an application.
// The instance(s) and its associated goroutine(s) will never be released.
// This is by design in an atempt to avoid some possibly nasty races on finalization.
// The "impossible to release" doesn't apply when NewGoCfg returns an Error.
NewGoCfg returns a newly created GoCfg or an Error if any.
It is assumed there will be only one/few GoCfg instance(s) in an application.
The instance(s) and its associated goroutine(s) will never be released.
This is by design in an atempt to avoid some possibly nasty races on finalization.
The "impossible to release" doesn't apply when NewGoCfg returns an Error.
// NewGoCfg returns a newly created GoCfg or an Error if any . // It is assumed there will be only one / few GoCfg instance ( s ) in an application . // The instance ( s ) and its associated goroutine ( s ) will never be released . // This is by design in an atempt to avoid some possibly nasty races on finalization . // The " impossible to release " doesn ' t apply when NewGoCfg returns an Error .
func NewGoCfg(fname string, logger *dns.Logger) (c *GoCfg, err error) {
	x := &GoCfg{}
	if x.cfg, err = NewCfg(fname, logger); err != nil {
		return
	}
	x.rq = make(chan bool, 10)
	x.re = make(chan *goCfgMsg, 10)
	c = x
	go func() {
		for {
			<-c.rq 
			msg := &goCfgMsg{}
			msg.f, msg.changed, msg.error = c.cfg.Conf()
			c.re <- msg 
		}
	}()
	return
}
func NewGoCfg ( fname string , logger * dns . Logger ) ( c * GoCfg , err error ) { x := & GoCfg { } if x . cfg , err = NewCfg ( fname , logger ) ; err != nil { return } x . rq = make ( chan bool , 10 ) x . re = make ( chan * goCfgMsg , 10 ) c = x go func ( ) { for { <- c . rq msg := & goCfgMsg { } msg . f , msg . changed , msg . error = c . cfg . Conf ( ) c . re <- msg } } ( ) return }
NewGoCfg returns a newly created GoCfg or an Error if any.
NewGoCfg returns a newly created GoCfg or an Error if any .
// wait for rq // return response