From c1aab0bee92e9d2a623554a62ad8cbdb2aad4ba9 Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Tue, 11 Dec 2018 21:54:36 +0100 Subject: [PATCH] config: update yaml-config and use zeropositive constraint for timeouts --- Gopkg.lock | 4 ++-- config/config.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index 6ad511b..a11b64a 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -281,11 +281,11 @@ [[projects]] branch = "v2" - digest = "1:9d92186f609a73744232323416ddafd56fae67cb552162cc190ab903e36900dd" + digest = "1:6b8a6afafde7ed31cd0c577ba40d88ce39e8f1c5eb76d7836be7d5b74f1c534a" name = "github.com/zrepl/yaml-config" packages = ["."] pruneopts = "" - revision = "af27d27978ad95808723a62d87557d63c3ff0605" + revision = "08227ad854131f7dfcdfb12579fb73dd8a38a03a" [[projects]] branch = "master" diff --git a/config/config.go b/config/config.go index eeea023..effa8f8 100644 --- a/config/config.go +++ b/config/config.go @@ -167,7 +167,7 @@ type ConnectCommon struct { type TCPConnect struct { ConnectCommon `yaml:",inline"` Address string `yaml:"address"` - DialTimeout time.Duration `yaml:"dial_timeout,positive,default=10s"` + DialTimeout time.Duration `yaml:"dial_timeout,zeropositive,default=10s"` } type TLSConnect struct { @@ -177,7 +177,7 @@ type TLSConnect struct { Cert string `yaml:"cert"` Key string `yaml:"key"` ServerCN string `yaml:"server_cn"` - DialTimeout time.Duration `yaml:"dial_timeout,positive,default=10s"` + DialTimeout time.Duration `yaml:"dial_timeout,zeropositive,default=10s"` } type SSHStdinserverConnect struct { @@ -189,7 +189,7 @@ type SSHStdinserverConnect struct { TransportOpenCommand []string `yaml:"transport_open_command,optional"` //TODO unused SSHCommand string `yaml:"ssh_command,optional"` //TODO unused Options []string `yaml:"options,optional"` - DialTimeout time.Duration `yaml:"dial_timeout,positive,default=10s"` + DialTimeout time.Duration `yaml:"dial_timeout,zeropositive,default=10s"` } type LocalConnect struct { @@ -220,7 +220,7 @@ type TLSServe struct { Cert string `yaml:"cert"` Key string `yaml:"key"` ClientCNs []string `yaml:"client_cns"` - HandshakeTimeout time.Duration `yaml:"handshake_timeout,positive,default=10s"` + HandshakeTimeout time.Duration `yaml:"handshake_timeout,zeropositive,default=10s"` } type StdinserverServer struct {