Refactor codebase

This commit is contained in:
2026-02-16 08:11:49 -05:00
parent 323709b0a1
commit bb88db92c1
9 changed files with 197 additions and 166 deletions

View File

@@ -27,7 +27,6 @@ var listCmd = &cobra.Command{
vpnServers, err := vpn.GetList(flagProxy, flagSocks5Proxy)
if err != nil {
log.Fatal().Msg(err.Error())
os.Exit(1)
}
table := tw.NewWriter(os.Stdout)
@@ -37,13 +36,11 @@ var listCmd = &cobra.Command{
err := table.Append([]string{strconv.Itoa(i + 1), v.HostName, v.CountryLong, v.Ping, strconv.Itoa(v.Score)})
if err != nil {
log.Fatal().Msg(err.Error())
os.Exit(1)
}
}
err = table.Render()
if err != nil {
log.Fatal().Msg(err.Error())
os.Exit(1)
}
},
}
}