improved config validation
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Jake Hillion 2020-12-11 18:03:47 +00:00
parent 6a0b378097
commit 8fdb176f14

View File

@ -24,7 +24,7 @@ type Peer struct {
RemoteHost string `validate:"required_with=RemotePort,omitempty,fqdn|ip"`
RemotePort uint `validate:"required_with=RemoteHost,omitempty,max=65535"`
Congestion string `validate:"oneof=NewReno None"`
Congestion string `validate:"required_unless=Method TCP,omitempty,oneof=NewReno None"`
KeepAlive uint
Timeout uint