feat(server): Handle creation of a webserver
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Matthieu 'JP' DERASSE
2023-01-09 19:44:29 +00:00
parent adc5055da4
commit 44ff19e779
5 changed files with 95 additions and 2 deletions

View File

@ -25,11 +25,11 @@ func GetListenAddressFromEnvOrFlags() (string, error) {
pHost := flag.String("host", host, "Host address to listen to")
pPort := flag.String("port", port, "Port to listen to")
if govalidator.IsHost(*pHost) {
if !govalidator.IsHost(*pHost) {
return "", fmt.Errorf("provided 'host' is invalid")
}
if govalidator.IsPort(*pPort) {
if !govalidator.IsPort(*pPort) {
return "", fmt.Errorf("provided 'port' is invalid")
}