Maintenance: remove some type aliases

This commit is contained in:
Quentin McGaw
2021-02-06 18:31:14 +00:00
parent 43e140e6cc
commit b1f1f94a76
32 changed files with 88 additions and 229 deletions

View File

@@ -237,7 +237,7 @@ func (l *looper) portForward(ctx context.Context, wg *sync.WaitGroup,
if !settings.Provider.PortForwarding.Enabled {
return
}
syncState := func(port uint16) (pfFilepath models.Filepath) {
syncState := func(port uint16) (pfFilepath string) {
l.state.portForwardedMu.Lock()
defer l.state.portForwardedMu.Unlock()
l.state.portForwarded = port
@@ -251,8 +251,7 @@ func (l *looper) portForward(ctx context.Context, wg *sync.WaitGroup,
}
func writeOpenvpnConf(lines []string, openFile os.OpenFileFunc) error {
const filepath = string(constants.OpenVPNConf)
file, err := openFile(filepath, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0644)
file, err := openFile(constants.OpenVPNConf, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0644)
if err != nil {
return err
}