aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/golang/protobuf/ptypes/duration.go
diff options
context:
space:
mode:
authorNathan Dench <ndenc2@gmail.com>2019-05-24 15:16:44 +1000
committerNathan Dench <ndenc2@gmail.com>2019-05-24 15:16:44 +1000
commit107c1cdb09c575aa2f61d97f48d8587eb6bada4c (patch)
treeca7d008643efc555c388baeaf1d986e0b6b3e28c /vendor/github.com/golang/protobuf/ptypes/duration.go
parent844b5a68d8af4791755b8f0ad293cc99f5959183 (diff)
downloadterraform-provider-statuscake-107c1cdb09c575aa2f61d97f48d8587eb6bada4c.tar.gz
terraform-provider-statuscake-107c1cdb09c575aa2f61d97f48d8587eb6bada4c.tar.zst
terraform-provider-statuscake-107c1cdb09c575aa2f61d97f48d8587eb6bada4c.zip
Upgrade to 0.12
Diffstat (limited to 'vendor/github.com/golang/protobuf/ptypes/duration.go')
-rw-r--r--vendor/github.com/golang/protobuf/ptypes/duration.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/vendor/github.com/golang/protobuf/ptypes/duration.go b/vendor/github.com/golang/protobuf/ptypes/duration.go
index 65cb0f8..26d1ca2 100644
--- a/vendor/github.com/golang/protobuf/ptypes/duration.go
+++ b/vendor/github.com/golang/protobuf/ptypes/duration.go
@@ -82,7 +82,7 @@ func Duration(p *durpb.Duration) (time.Duration, error) {
82 return 0, fmt.Errorf("duration: %v is out of range for time.Duration", p) 82 return 0, fmt.Errorf("duration: %v is out of range for time.Duration", p)
83 } 83 }
84 if p.Nanos != 0 { 84 if p.Nanos != 0 {
85 d += time.Duration(p.Nanos) 85 d += time.Duration(p.Nanos) * time.Nanosecond
86 if (d < 0) != (p.Nanos < 0) { 86 if (d < 0) != (p.Nanos < 0) {
87 return 0, fmt.Errorf("duration: %v is out of range for time.Duration", p) 87 return 0, fmt.Errorf("duration: %v is out of range for time.Duration", p)
88 } 88 }