feat: optimize code

This commit is contained in:
fengcaiwen
2023-03-16 19:11:22 +08:00
committed by wencaiwulue
parent a545f3a958
commit 1970f30f9d
13 changed files with 173 additions and 144 deletions

View File

@@ -33,11 +33,11 @@ func InstallWireGuardTunDriver() {
}
func UninstallWireGuardTunDriver() error {
wd, err := os.Getwd()
executable, err := os.Executable()
if err != nil {
return err
}
filename := filepath.Join(wd, "wintun.dll")
filename := filepath.Join(filepath.Dir(executable), "wintun.dll")
return os.Remove(filename)
}