chore: use gofumpt for code formatting

This commit is contained in:
Quentin McGaw
2024-10-11 19:20:48 +00:00
parent 3daf15a612
commit 76a4bb5dc3
289 changed files with 784 additions and 548 deletions

View File

@@ -12,7 +12,8 @@ import (
)
func fetchServers(ctx context.Context, client *http.Client) (
hostToData map[string]serverData, err error) {
hostToData map[string]serverData, err error,
) {
const url = "https://www.slickvpn.com/locations/"
rootNode, err := htmlutils.Fetch(ctx, client, url)
if err != nil {
@@ -133,9 +134,7 @@ func matchA(cellNode *html.Node) (match bool) {
var serverNameRegex = regexp.MustCompile(`^.+\/(?P<serverName>.+)\.ovpn$`)
var (
ErrExtractHostnameFromURL = errors.New("cannot extract hostname from url")
)
var ErrExtractHostnameFromURL = errors.New("cannot extract hostname from url")
func extractHostnameFromURL(url string) (hostname string, err error) {
matches := serverNameRegex.FindStringSubmatch(url)