more ini pointer refinements

This commit is contained in:
idk
2018-09-18 23:15:38 -04:00
parent 02ff8d6b87
commit 1b8aef71f5
4 changed files with 14 additions and 11 deletions

View File

@ -54,6 +54,7 @@ type Conf struct {
AccessListType string
AccessList []string
MessageReliability string
exists bool
}
// Print returns and prints a formatted list of configured tunnel settings.
@ -222,6 +223,7 @@ func (c *Conf) I2PINILoad(iniFile string, label ...string) error {
// NewI2PBlankTunConf returns an empty but intialized tunconf
func NewI2PBlankTunConf() *Conf {
var c Conf
c.exists = true
return &c
}
@ -229,7 +231,7 @@ func NewI2PBlankTunConf() *Conf {
// before starting the tunnel
func NewI2PTunConf(iniFile string, label ...string) (*Conf, error) {
var err error
var c Conf
var c := NewI2PBlankTunConf()
if err = c.I2PINILoad(iniFile, label...); err != nil {
return nil, err
}