- Remove exported interfaces unused locally - Define interfaces to accept arguments - Return concrete types, not interfaces
27 lines
527 B
Go
27 lines
527 B
Go
package openvpn
|
|
|
|
import (
|
|
"github.com/qdm12/gluetun/internal/constants/openvpn"
|
|
"github.com/qdm12/golibs/command"
|
|
)
|
|
|
|
type Configurator struct {
|
|
logger Infoer
|
|
cmder command.RunStarter
|
|
configPath string
|
|
authFilePath string
|
|
puid, pgid int
|
|
}
|
|
|
|
func New(logger Infoer, cmder command.RunStarter,
|
|
puid, pgid int) *Configurator {
|
|
return &Configurator{
|
|
logger: logger,
|
|
cmder: cmder,
|
|
configPath: configPath,
|
|
authFilePath: openvpn.AuthConf,
|
|
puid: puid,
|
|
pgid: pgid,
|
|
}
|
|
}
|