From a94e975d099daa4796abc9105554803ab6c68f73 Mon Sep 17 00:00:00 2001 From: Igor Shishkin Date: Thu, 13 Jun 2024 00:31:34 +0300 Subject: [PATCH] Use go-time instead of own duration implementation (#54) Signed-off-by: Igor Shishkin --- checkers/dns_lookup/dns_lookup.go | 4 +- checkers/dns_lookup/dns_lookup_test.go | 11 +++-- checkers/dns_lookup/spec.go | 13 +++--- checkers/dns_lookup/spec_test.go | 15 ++++--- checkers/http_2xx/http_2xx.go | 4 +- checkers/http_2xx/http_2xx_test.go | 19 ++++----- checkers/http_2xx/spec.go | 13 +++--- checkers/http_2xx/spec_test.go | 7 ++-- checkers/icmp_ping/icmp_ping.go | 4 +- checkers/icmp_ping/icmp_ping_test.go | 7 ++-- checkers/icmp_ping/spec.go | 11 +++-- checkers/icmp_ping/spec_test.go | 11 +++-- checkers/tftp_rrq/spec.go | 13 +++--- checkers/tftp_rrq/spec_test.go | 18 ++++---- checkers/tftp_rrq/tftp_rrq.go | 4 +- checkers/tftp_rrq/tftp_rrq_test.go | 14 +++---- cmd/anycastd/main.go | 3 +- config/config.go | 7 ++-- config/config_test.go | 3 +- config/duration.go | 37 ----------------- config/duration_test.go | 57 -------------------------- go.mod | 1 + go.sum | 2 + 23 files changed, 89 insertions(+), 189 deletions(-) delete mode 100644 config/duration.go delete mode 100644 config/duration_test.go diff --git a/checkers/dns_lookup/dns_lookup.go b/checkers/dns_lookup/dns_lookup.go index db308ae..a8cc702 100644 --- a/checkers/dns_lookup/dns_lookup.go +++ b/checkers/dns_lookup/dns_lookup.go @@ -47,8 +47,8 @@ func New(s spec) (checkers.Checker, error) { query: s.Query, resolver: s.Resolver, tries: s.Tries, - interval: time.Duration(s.Interval), - timeout: time.Duration(s.Timeout), + interval: s.Interval.TimeDuration(), + timeout: s.Timeout.TimeDuration(), resolverMaker: mkResolver, }, nil diff --git a/checkers/dns_lookup/dns_lookup_test.go b/checkers/dns_lookup/dns_lookup_test.go index aa97590..5f8beeb 100644 --- a/checkers/dns_lookup/dns_lookup_test.go +++ b/checkers/dns_lookup/dns_lookup_test.go @@ -12,8 +12,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - - "github.com/teran/anycastd/config" + th "github.com/teran/go-time" ) func TestMkResolver(t *testing.T) { @@ -49,8 +48,8 @@ func (s *checkTestSuite) TestHappyPath() { Query: "example.com", Resolver: "127.0.0.1:53", Tries: 3, - Interval: config.Duration(2 * time.Second), - Timeout: config.Duration(5 * time.Second), + Interval: th.Duration(2 * time.Second), + Timeout: th.Duration(5 * time.Second), }) s.Require().NoError(err) @@ -68,8 +67,8 @@ func (s *checkTestSuite) TestSecondTry() { Query: "example.com", Resolver: "127.0.0.1:53", Tries: 3, - Interval: config.Duration(2 * time.Second), - Timeout: config.Duration(5 * time.Second), + Interval: th.Duration(2 * time.Second), + Timeout: th.Duration(5 * time.Second), }) s.Require().NoError(err) diff --git a/checkers/dns_lookup/spec.go b/checkers/dns_lookup/spec.go index e593cab..d21bb21 100644 --- a/checkers/dns_lookup/spec.go +++ b/checkers/dns_lookup/spec.go @@ -3,16 +3,15 @@ package dns_lookup import ( validation "github.com/go-ozzo/ozzo-validation/v4" "github.com/go-ozzo/ozzo-validation/v4/is" - - "github.com/teran/anycastd/config" + th "github.com/teran/go-time" ) type spec struct { - Query string `json:"query"` - Resolver string `json:"resolver"` - Tries uint8 `json:"tries"` - Interval config.Duration `json:"interval"` - Timeout config.Duration `json:"timeout"` + Query string `json:"query"` + Resolver string `json:"resolver"` + Tries uint8 `json:"tries"` + Interval th.Duration `json:"interval"` + Timeout th.Duration `json:"timeout"` } func (s spec) Validate() error { diff --git a/checkers/dns_lookup/spec_test.go b/checkers/dns_lookup/spec_test.go index c811748..788e898 100644 --- a/checkers/dns_lookup/spec_test.go +++ b/checkers/dns_lookup/spec_test.go @@ -6,8 +6,7 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/require" - - "github.com/teran/anycastd/config" + th "github.com/teran/go-time" ) func TestSpecValidation(t *testing.T) { @@ -24,8 +23,8 @@ func TestSpecValidation(t *testing.T) { Query: "example.com", Resolver: "127.0.0.1:53", Tries: 3, - Interval: config.Duration(1 * time.Second), - Timeout: config.Duration(5 * time.Second), + Interval: th.Duration(1 * time.Second), + Timeout: th.Duration(5 * time.Second), }, }, { @@ -34,8 +33,8 @@ func TestSpecValidation(t *testing.T) { Query: "blah!", Resolver: "127.0.0.1:53", Tries: 3, - Interval: config.Duration(1 * time.Second), - Timeout: config.Duration(5 * time.Second), + Interval: th.Duration(1 * time.Second), + Timeout: th.Duration(5 * time.Second), }, expError: errors.New("query: must be a valid DNS name."), }, @@ -45,8 +44,8 @@ func TestSpecValidation(t *testing.T) { Query: "example.com", Resolver: "!!!", Tries: 3, - Interval: config.Duration(1 * time.Second), - Timeout: config.Duration(5 * time.Second), + Interval: th.Duration(1 * time.Second), + Timeout: th.Duration(5 * time.Second), }, expError: errors.New("resolver: must be a valid dial string."), }, diff --git a/checkers/http_2xx/http_2xx.go b/checkers/http_2xx/http_2xx.go index 1f7c079..4df7fe9 100644 --- a/checkers/http_2xx/http_2xx.go +++ b/checkers/http_2xx/http_2xx.go @@ -30,7 +30,7 @@ type http_2xx struct { func New(s spec) (checkers.Checker, error) { client := &http.Client{ - Timeout: time.Duration(s.Timeout), + Timeout: s.Timeout.TimeDuration(), } if err := s.Validate(); err != nil { @@ -42,7 +42,7 @@ func New(s spec) (checkers.Checker, error) { url: s.URL, method: s.Method, tries: s.Tries, - interval: time.Duration(s.Interval), + interval: s.Interval.TimeDuration(), }, nil } diff --git a/checkers/http_2xx/http_2xx_test.go b/checkers/http_2xx/http_2xx_test.go index e03c82b..e4c25d3 100644 --- a/checkers/http_2xx/http_2xx_test.go +++ b/checkers/http_2xx/http_2xx_test.go @@ -12,8 +12,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - - "github.com/teran/anycastd/config" + th "github.com/teran/go-time" ) func TestSpec(t *testing.T) { @@ -40,8 +39,8 @@ func (s *http2xxTestSuite) TestTrivial() { URL: s.srv.URL + "/ping", Method: "GET", Tries: 1, - Interval: config.Duration(1 * time.Second), - Timeout: config.Duration(5 * time.Second), + Interval: th.Duration(1 * time.Second), + Timeout: th.Duration(5 * time.Second), }) s.Require().NoError(err) @@ -56,8 +55,8 @@ func (s *http2xxTestSuite) TestFiveTries() { URL: s.srv.URL + "/ping", Method: "GET", Tries: 5, - Interval: config.Duration(1 * time.Second), - Timeout: config.Duration(5 * time.Second), + Interval: th.Duration(1 * time.Second), + Timeout: th.Duration(5 * time.Second), }) s.Require().NoError(err) @@ -74,8 +73,8 @@ func (s *http2xxTestSuite) TestSuccessFromThirdTime() { URL: s.srv.URL + "/ping", Method: "GET", Tries: 3, - Interval: config.Duration(1 * time.Millisecond), - Timeout: config.Duration(5 * time.Second), + Interval: th.Duration(1 * time.Millisecond), + Timeout: th.Duration(5 * time.Second), }) s.Require().NoError(err) @@ -90,8 +89,8 @@ func (s *http2xxTestSuite) TestNegative() { URL: s.srv.URL + "/ping", Method: "GET", Tries: 2, - Interval: config.Duration(1 * time.Millisecond), - Timeout: config.Duration(5 * time.Second), + Interval: th.Duration(1 * time.Millisecond), + Timeout: th.Duration(5 * time.Second), }) s.Require().NoError(err) diff --git a/checkers/http_2xx/spec.go b/checkers/http_2xx/spec.go index f388c71..255d253 100644 --- a/checkers/http_2xx/spec.go +++ b/checkers/http_2xx/spec.go @@ -3,16 +3,15 @@ package http_2xx import ( validation "github.com/go-ozzo/ozzo-validation/v4" "github.com/go-ozzo/ozzo-validation/v4/is" - - "github.com/teran/anycastd/config" + th "github.com/teran/go-time" ) type spec struct { - URL string `json:"url"` - Method string `json:"method"` - Tries uint8 `json:"tries"` - Interval config.Duration `json:"interval"` - Timeout config.Duration `json:"timeout"` + URL string `json:"url"` + Method string `json:"method"` + Tries uint8 `json:"tries"` + Interval th.Duration `json:"interval"` + Timeout th.Duration `json:"timeout"` } func (s spec) Validate() error { diff --git a/checkers/http_2xx/spec_test.go b/checkers/http_2xx/spec_test.go index 7241a50..c1113d0 100644 --- a/checkers/http_2xx/spec_test.go +++ b/checkers/http_2xx/spec_test.go @@ -6,8 +6,7 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/require" - - "github.com/teran/anycastd/config" + th "github.com/teran/go-time" ) func TestSpecValidation(t *testing.T) { @@ -24,8 +23,8 @@ func TestSpecValidation(t *testing.T) { URL: "http://127.0.0.1:8080/", Method: "GET", Tries: 3, - Interval: config.Duration(1 * time.Second), - Timeout: config.Duration(5 * time.Second), + Interval: th.Duration(1 * time.Second), + Timeout: th.Duration(5 * time.Second), }, }, { diff --git a/checkers/icmp_ping/icmp_ping.go b/checkers/icmp_ping/icmp_ping.go index 8815842..f77106a 100644 --- a/checkers/icmp_ping/icmp_ping.go +++ b/checkers/icmp_ping/icmp_ping.go @@ -130,8 +130,8 @@ func newWithPinger( return &icmp_ping{ host: s.Static.Host, tries: s.Tries, - interval: time.Duration(s.Interval), - timeout: time.Duration(s.Timeout), + interval: s.Interval.TimeDuration(), + timeout: s.Timeout.TimeDuration(), pingerFn: pingerFn, }, nil diff --git a/checkers/icmp_ping/icmp_ping_test.go b/checkers/icmp_ping/icmp_ping_test.go index 1723947..e696b80 100644 --- a/checkers/icmp_ping/icmp_ping_test.go +++ b/checkers/icmp_ping/icmp_ping_test.go @@ -8,8 +8,7 @@ import ( "time" "github.com/stretchr/testify/require" - - "github.com/teran/anycastd/config" + th "github.com/teran/go-time" ) func TestSpec(t *testing.T) { @@ -35,8 +34,8 @@ func TestCheck(t *testing.T) { spec{ Static: Static{Host: "127.0.0.1"}, Tries: 10, - Interval: config.Duration(10 * time.Second), - Timeout: config.Duration(30 * time.Second), + Interval: th.Duration(10 * time.Second), + Timeout: th.Duration(30 * time.Second), }, func(host string, tries uint8, interval, timeout time.Duration) (*pingStats, error) { r.Equal("127.0.0.1", host) diff --git a/checkers/icmp_ping/spec.go b/checkers/icmp_ping/spec.go index 199499e..5f227e4 100644 --- a/checkers/icmp_ping/spec.go +++ b/checkers/icmp_ping/spec.go @@ -3,8 +3,7 @@ package icmp_ping import ( validation "github.com/go-ozzo/ozzo-validation/v4" "github.com/go-ozzo/ozzo-validation/v4/is" - - "github.com/teran/anycastd/config" + th "github.com/teran/go-time" ) type Static struct { @@ -18,10 +17,10 @@ func (s Static) Validate() error { } type spec struct { - Static Static `json:"static"` - Tries uint8 `json:"tries"` - Interval config.Duration `json:"interval"` - Timeout config.Duration `json:"timeout"` + Static Static `json:"static"` + Tries uint8 `json:"tries"` + Interval th.Duration `json:"interval"` + Timeout th.Duration `json:"timeout"` } func (s spec) Validate() error { diff --git a/checkers/icmp_ping/spec_test.go b/checkers/icmp_ping/spec_test.go index e0fc0ef..6060561 100644 --- a/checkers/icmp_ping/spec_test.go +++ b/checkers/icmp_ping/spec_test.go @@ -6,8 +6,7 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/require" - - "github.com/teran/anycastd/config" + th "github.com/teran/go-time" ) func TestSpecValidation(t *testing.T) { @@ -23,8 +22,8 @@ func TestSpecValidation(t *testing.T) { in: spec{ Static: Static{Host: "test.example.org"}, Tries: 10, - Interval: config.Duration(1 * time.Second), - Timeout: config.Duration(2 * time.Second), + Interval: th.Duration(1 * time.Second), + Timeout: th.Duration(2 * time.Second), }, }, { @@ -32,8 +31,8 @@ func TestSpecValidation(t *testing.T) { in: spec{ Static: Static{Host: "127.0.0.1"}, Tries: 10, - Interval: config.Duration(1 * time.Second), - Timeout: config.Duration(2 * time.Second), + Interval: th.Duration(1 * time.Second), + Timeout: th.Duration(2 * time.Second), }, }, { diff --git a/checkers/tftp_rrq/spec.go b/checkers/tftp_rrq/spec.go index 012de69..995f739 100644 --- a/checkers/tftp_rrq/spec.go +++ b/checkers/tftp_rrq/spec.go @@ -3,16 +3,15 @@ package tftp_rrq import ( validation "github.com/go-ozzo/ozzo-validation/v4" "github.com/go-ozzo/ozzo-validation/v4/is" - - "github.com/teran/anycastd/config" + th "github.com/teran/go-time" ) type spec struct { - URL string `json:"url"` - ExpectedSHA256 *string `json:"expected_sha256"` - Tries uint8 `json:"tries"` - Interval config.Duration `json:"interval"` - Timeout config.Duration `json:"timeout"` + URL string `json:"url"` + ExpectedSHA256 *string `json:"expected_sha256"` + Tries uint8 `json:"tries"` + Interval th.Duration `json:"interval"` + Timeout th.Duration `json:"timeout"` } func (s spec) Validate() error { diff --git a/checkers/tftp_rrq/spec_test.go b/checkers/tftp_rrq/spec_test.go index 235a62a..bd557d7 100644 --- a/checkers/tftp_rrq/spec_test.go +++ b/checkers/tftp_rrq/spec_test.go @@ -6,8 +6,8 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/require" + th "github.com/teran/go-time" - "github.com/teran/anycastd/config" "github.com/teran/go-ptr" ) @@ -24,8 +24,8 @@ func TestSpecValidation(t *testing.T) { in: spec{ URL: "tftp://127.0.0.1:69/lpxelinux.0", Tries: 3, - Interval: config.Duration(1 * time.Second), - Timeout: config.Duration(2 * time.Second), + Interval: th.Duration(1 * time.Second), + Timeout: th.Duration(2 * time.Second), }, }, { @@ -34,8 +34,8 @@ func TestSpecValidation(t *testing.T) { URL: "tftp://127.0.0.1:69/lpxelinux.0", ExpectedSHA256: ptr.String("09da9c01b6b2a8ccc5d3445c4f364243d8a063bd0bf520643737899e6ce0170f"), Tries: 3, - Interval: config.Duration(1 * time.Second), - Timeout: config.Duration(2 * time.Second), + Interval: th.Duration(1 * time.Second), + Timeout: th.Duration(2 * time.Second), }, }, { @@ -51,8 +51,8 @@ func TestSpecValidation(t *testing.T) { URL: "tftp://127.0.0.1:69/lpxelinux.0", ExpectedSHA256: ptr.String("09da9c01b6b2a8ccc5d3445c4f364243d8a063bd0bf520643737899e6ce0170s"), Tries: 3, - Interval: config.Duration(1 * time.Second), - Timeout: config.Duration(2 * time.Second), + Interval: th.Duration(1 * time.Second), + Timeout: th.Duration(2 * time.Second), }, expError: errors.New("expected_sha256: must be a valid hexadecimal number."), }, @@ -62,8 +62,8 @@ func TestSpecValidation(t *testing.T) { URL: "tftp://127.0.0.1:69/lpxelinux.0", ExpectedSHA256: ptr.String("deadbeef"), Tries: 3, - Interval: config.Duration(1 * time.Second), - Timeout: config.Duration(2 * time.Second), + Interval: th.Duration(1 * time.Second), + Timeout: th.Duration(2 * time.Second), }, expError: errors.New("expected_sha256: the length must be exactly 64."), }, diff --git a/checkers/tftp_rrq/tftp_rrq.go b/checkers/tftp_rrq/tftp_rrq.go index 60cce7d..4f9bd67 100644 --- a/checkers/tftp_rrq/tftp_rrq.go +++ b/checkers/tftp_rrq/tftp_rrq.go @@ -41,8 +41,8 @@ func New(s spec) (checkers.Checker, error) { url: s.URL, expSHA256: s.ExpectedSHA256, tries: s.Tries, - interval: time.Duration(s.Interval), - timeout: time.Duration(s.Timeout), + interval: s.Interval.TimeDuration(), + timeout: s.Timeout.TimeDuration(), }, nil } diff --git a/checkers/tftp_rrq/tftp_rrq_test.go b/checkers/tftp_rrq/tftp_rrq_test.go index d1c39f9..a122412 100644 --- a/checkers/tftp_rrq/tftp_rrq_test.go +++ b/checkers/tftp_rrq/tftp_rrq_test.go @@ -15,8 +15,8 @@ import ( "github.com/pin/tftp" "github.com/pkg/errors" "github.com/stretchr/testify/require" - "github.com/teran/anycastd/config" "github.com/teran/go-ptr" + th "github.com/teran/go-time" ) func TestSpec(t *testing.T) { @@ -52,8 +52,8 @@ func TestCheck(t *testing.T) { return spec{ URL: fmt.Sprintf("tftp://%s/test", address), Tries: 3, - Interval: config.Duration(100 * time.Millisecond), - Timeout: config.Duration(1 * time.Second), + Interval: th.Duration(100 * time.Millisecond), + Timeout: th.Duration(1 * time.Second), } }, }, @@ -64,8 +64,8 @@ func TestCheck(t *testing.T) { URL: fmt.Sprintf("tftp://%s/test", address), ExpectedSHA256: ptr.String(mockChecksum), Tries: 3, - Interval: config.Duration(100 * time.Millisecond), - Timeout: config.Duration(1 * time.Second), + Interval: th.Duration(100 * time.Millisecond), + Timeout: th.Duration(1 * time.Second), } }, }, @@ -76,8 +76,8 @@ func TestCheck(t *testing.T) { URL: fmt.Sprintf("tftp://%s/test", address), ExpectedSHA256: ptr.String(strings.ReplaceAll(mockChecksum, "a", "b")), Tries: 3, - Interval: config.Duration(100 * time.Millisecond), - Timeout: config.Duration(1 * time.Second), + Interval: th.Duration(100 * time.Millisecond), + Timeout: th.Duration(1 * time.Second), } }, expError: errors.Errorf( diff --git a/cmd/anycastd/main.go b/cmd/anycastd/main.go index 6b5e2df..9ca5a57 100644 --- a/cmd/anycastd/main.go +++ b/cmd/anycastd/main.go @@ -4,7 +4,6 @@ import ( "context" "net/http" "os" - "time" "github.com/kelseyhightower/envconfig" apipb "github.com/osrg/gobgp/v3/api" @@ -139,7 +138,7 @@ func main() { panic(err) } - svc := service.New(svcCfg.Name, a, checks, time.Duration(svcCfg.CheckInterval), metrics) + svc := service.New(svcCfg.Name, a, checks, svcCfg.CheckInterval.TimeDuration(), metrics) g.Go(func() error { return svc.Run(ctx) diff --git a/config/config.go b/config/config.go index 3dc35b8..7b901a1 100644 --- a/config/config.go +++ b/config/config.go @@ -10,6 +10,7 @@ import ( validation "github.com/go-ozzo/ozzo-validation/v4" "github.com/go-ozzo/ozzo-validation/v4/is" "github.com/pkg/errors" + th "github.com/teran/go-time" yaml "gopkg.in/yaml.v3" ) @@ -69,9 +70,9 @@ func (p Peer) Validate() error { } type Service struct { - Name string `json:"name"` - CheckInterval Duration `json:"check_interval"` - Checks []Check `json:"checks"` + Name string `json:"name"` + CheckInterval th.Duration `json:"check_interval"` + Checks []Check `json:"checks"` } func (s Service) Validate() error { diff --git a/config/config_test.go b/config/config_test.go index e5cda48..b9d028a 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -7,6 +7,7 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/require" + th "github.com/teran/go-time" ) func TestConfig(t *testing.T) { @@ -39,7 +40,7 @@ func TestConfig(t *testing.T) { Services: []Service{ { Name: "http", - CheckInterval: Duration(time.Duration(10 * time.Second)), + CheckInterval: th.Duration(10 * time.Second), Checks: []Check{ { Kind: "dns_lookup", diff --git a/config/duration.go b/config/duration.go deleted file mode 100644 index b515c7b..0000000 --- a/config/duration.go +++ /dev/null @@ -1,37 +0,0 @@ -package config - -import ( - "encoding/json" - "time" - - "github.com/pkg/errors" -) - -type Duration time.Duration - -func (d Duration) MarshalJSON() ([]byte, error) { - return json.Marshal(time.Duration(d).String()) -} - -func (d *Duration) UnmarshalJSON(b []byte) error { - var v any - - if err := json.Unmarshal(b, &v); err != nil { - return err - } - - switch value := v.(type) { - case float64: - *d = Duration(time.Duration(value)) - return nil - case string: - tmp, err := time.ParseDuration(value) - if err != nil { - return err - } - *d = Duration(tmp) - return nil - default: - return errors.Errorf("invalid value: `%v` (%T)", value, value) - } -} diff --git a/config/duration_test.go b/config/duration_test.go deleted file mode 100644 index b6fd290..0000000 --- a/config/duration_test.go +++ /dev/null @@ -1,57 +0,0 @@ -package config - -import ( - "encoding/json" - "testing" - "time" - - "github.com/pkg/errors" - "github.com/stretchr/testify/require" -) - -func TestDuration(t *testing.T) { - type testCase struct { - name string - in string - expOut Duration - expError error - } - tcs := []testCase{ - { - name: "number", - in: "10", - expOut: Duration(time.Duration(10)), - }, - { - name: "number w/ suffix", - in: `"10s"`, - expOut: Duration(time.Duration(10 * time.Second)), - }, - { - name: "invalid string", - in: `"blah"`, - expError: errors.Errorf(`time: invalid duration "blah"`), - }, - { - name: "boolean", - in: "true", - expError: errors.Errorf("invalid value: `true` (bool)"), - }, - } - - for _, tc := range tcs { - t.Run(tc.name, func(t *testing.T) { - r := require.New(t) - - v := new(Duration) - err := json.Unmarshal([]byte(tc.in), v) - if tc.expError == nil { - r.NoError(err) - r.Equal(&tc.expOut, v) - } else { - r.Error(err) - r.Equal(tc.expError.Error(), err.Error()) - } - }) - } -} diff --git a/go.mod b/go.mod index 86d73bb..a859443 100644 --- a/go.mod +++ b/go.mod @@ -14,6 +14,7 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/stretchr/testify v1.9.0 github.com/teran/go-ptr v1.1.0 + github.com/teran/go-time v0.0.1 golang.org/x/sync v0.7.0 google.golang.org/protobuf v1.34.1 gopkg.in/yaml.v3 v3.0.1 diff --git a/go.sum b/go.sum index 1ad77f9..ea260fb 100644 --- a/go.sum +++ b/go.sum @@ -221,6 +221,8 @@ github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8 github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/teran/go-ptr v1.1.0 h1:c/5SPr+FB4zfmmKVB+KTCNKpgC/zWKBY5JHReL84lKU= github.com/teran/go-ptr v1.1.0/go.mod h1:2gyUP12bjbvBfyXm/NflOYJHONy415pNVeSTOZHna+A= +github.com/teran/go-time v0.0.1 h1:3SG5/Ta0jYhuJ/4hPxFHm1lsCmFVofcHYr8TN/aLYAg= +github.com/teran/go-time v0.0.1/go.mod h1:SWHduXc5FdmHXtK4cJj2eAhBBcxNeKh10W1A4l+Jsr4= github.com/vishvananda/netlink v1.2.1-beta.2 h1:Llsql0lnQEbHj0I1OuKyp8otXp0r3q0mPkuhwHfStVs= github.com/vishvananda/netlink v1.2.1-beta.2/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0=