Files
gluetun/internal/updater/providers/cyberghost/string.go
Quentin McGaw e8e7b83297 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
2021-05-08 00:59:42 +00:00

16 lines
404 B
Go

package cyberghost
import "github.com/qdm12/gluetun/internal/models"
// Stringify converts servers to code string format.
func Stringify(servers []models.CyberghostServer) (s string) {
s = "func CyberghostServers() []models.CyberghostServer {\n"
s += " return []models.CyberghostServer{\n"
for _, server := range servers {
s += " " + server.String() + ",\n"
}
s += " }\n"
s += "}"
return s
}