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

@@ -7,12 +7,11 @@ import (
"github.com/qdm12/gluetun/internal/provider/surfshark/servers"
)
var (
errHostnameNotFound = errors.New("hostname not found in hostname to location mapping")
)
var errHostnameNotFound = errors.New("hostname not found in hostname to location mapping")
func getHostInformation(host string, hostnameToLocation map[string]servers.ServerLocation) (
data servers.ServerLocation, err error) {
data servers.ServerLocation, err error,
) {
locationData, ok := hostnameToLocation[host]
if !ok {
return locationData, fmt.Errorf("%w: %s", errHostnameNotFound, host)
@@ -22,7 +21,8 @@ func getHostInformation(host string, hostnameToLocation map[string]servers.Serve
}
func hostToLocation(locationData []servers.ServerLocation) (
hostToLocation map[string]servers.ServerLocation) {
hostToLocation map[string]servers.ServerLocation,
) {
hostToLocation = make(map[string]servers.ServerLocation, len(locationData))
for _, data := range locationData {
hostToLocation[data.Hostname] = data