Maintenance: refactor servers updater code
- Require at least 80% of number of servers now to pass - Each provider is in its own package with a common structure - Unzip package with unzipper interface - Openvpn package with extraction and download functions
This commit is contained in:
14
internal/updater/providers/windscribe/string.go
Normal file
14
internal/updater/providers/windscribe/string.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package windscribe
|
||||
|
||||
import "github.com/qdm12/gluetun/internal/models"
|
||||
|
||||
func Stringify(servers []models.WindscribeServer) (s string) {
|
||||
s = "func WindscribeServers() []models.WindscribeServer {\n"
|
||||
s += " return []models.WindscribeServer{\n"
|
||||
for _, server := range servers {
|
||||
s += " " + server.String() + ",\n"
|
||||
}
|
||||
s += " }\n"
|
||||
s += "}"
|
||||
return s
|
||||
}
|
||||
Reference in New Issue
Block a user