From bf7ee8a91acf17613ffcd9c2f8c13abfa1ed0a11 Mon Sep 17 00:00:00 2001 From: Anthony Fok Date: Mon, 3 Jul 2023 18:53:49 -0600 Subject: [PATCH] Bump github.com/bep/clock v0.3.0 to renamed github.com/bep/clocks v0.5.0 --- README.md | 1 - commands/commandeer.go | 6 +++--- common/htime/time.go | 4 ++-- go.mod | 3 +-- go.sum | 2 -- hugolib/page_test.go | 6 +++--- 6 files changed, 9 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 62b24d7bc2f..c28a0a2bb53 100644 --- a/README.md +++ b/README.md @@ -176,7 +176,6 @@ github.com/aws/aws-sdk-go-v2/service/sts="v1.19.2" github.com/aws/aws-sdk-go-v2="v1.18.1" github.com/aws/aws-sdk-go="v1.44.284" github.com/aws/smithy-go="v1.13.5" -github.com/bep/clock="v0.3.0" github.com/bep/clocks="v0.5.0" github.com/bep/debounce="v1.2.0" github.com/bep/gitmap="v1.1.2" diff --git a/commands/commandeer.go b/commands/commandeer.go index 1a4ecf64f4f..ef504bcbcac 100644 --- a/commands/commandeer.go +++ b/commands/commandeer.go @@ -30,7 +30,7 @@ import ( "go.uber.org/automaxprocs/maxprocs" - "github.com/bep/clock" + "github.com/bep/clocks" "github.com/bep/lazycache" "github.com/bep/logg" "github.com/bep/overlayfs" @@ -173,7 +173,7 @@ func (r *rootCommand) ConfigFromConfig(key int32, oldConf *commonConfig) (*commo if !configs.Base.C.Clock.IsZero() { // TODO(bep) find a better place for this. - htime.Clock = clock.Start(configs.Base.C.Clock) + htime.Clock = clocks.Start(configs.Base.C.Clock) } return &commonConfig{ @@ -283,7 +283,7 @@ func (r *rootCommand) ConfigFromProvider(key int32, cfg config.Provider) (*commo if !base.C.Clock.IsZero() { // TODO(bep) find a better place for this. - htime.Clock = clock.Start(configs.Base.C.Clock) + htime.Clock = clocks.Start(configs.Base.C.Clock) } if base.PrintPathWarnings { diff --git a/common/htime/time.go b/common/htime/time.go index 961962b6074..f2fff897c44 100644 --- a/common/htime/time.go +++ b/common/htime/time.go @@ -18,7 +18,7 @@ import ( "strings" "time" - "github.com/bep/clock" + "github.com/bep/clocks" "github.com/spf13/cast" "github.com/gohugoio/locales" @@ -75,7 +75,7 @@ var ( "December", } - Clock = clock.System() + Clock = clocks.System() ) func NewTimeFormatter(ltr locales.Translator) TimeFormatter { diff --git a/go.mod b/go.mod index 2429ca288f5..68780836f8c 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/alecthomas/chroma/v2 v2.8.0 github.com/armon/go-radix v1.0.0 github.com/aws/aws-sdk-go v1.43.5 - github.com/bep/clock v0.3.0 + github.com/bep/clocks v0.5.0 github.com/bep/debounce v1.2.0 github.com/bep/gitmap v1.1.2 github.com/bep/goat v0.5.0 @@ -104,7 +104,6 @@ require ( github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.1 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.18.3 // indirect github.com/aws/smithy-go v1.13.5 // indirect - github.com/bep/clocks v0.5.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/dlclark/regexp2 v1.10.0 // indirect github.com/go-openapi/jsonpointer v0.19.5 // indirect diff --git a/go.sum b/go.sum index 0248514fc15..70bb9519ffb 100644 --- a/go.sum +++ b/go.sum @@ -174,8 +174,6 @@ github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAm github.com/aws/smithy-go v1.13.5 h1:hgz0X/DX0dGqTYpGALqXJoRKRj5oQ7150i5FdTePzO8= github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/bep/clock v0.3.0 h1:vfOA6+wVb6pPQEiXow9f/too92vNTLe9MuwO13PfI0M= -github.com/bep/clock v0.3.0/go.mod h1:6Gz2lapnJ9vxpvPxQ2u6FcXFRoj4kkiqQ6pm0ERZlwk= github.com/bep/clocks v0.5.0 h1:hhvKVGLPQWRVsBP/UB7ErrHYIO42gINVbvqxvYTPVps= github.com/bep/clocks v0.5.0/go.mod h1:SUq3q+OOq41y2lRQqH5fsOoxN8GbxSiT6jvoVVLCVhU= github.com/bep/debounce v1.2.0 h1:wXds8Kq8qRfwAOpAxHrJDbCXgC5aHSzgQb/0gKsHQqo= diff --git a/hugolib/page_test.go b/hugolib/page_test.go index 6b817551ee9..162f260527c 100644 --- a/hugolib/page_test.go +++ b/hugolib/page_test.go @@ -22,7 +22,7 @@ import ( "testing" "time" - "github.com/bep/clock" + "github.com/bep/clocks" "github.com/gohugoio/hugo/identity" "github.com/gohugoio/hugo/markup/asciidocext" "github.com/gohugoio/hugo/markup/rst" @@ -1502,8 +1502,8 @@ func TestShouldBuild(t *testing.T) { } func TestShouldBuildWithClock(t *testing.T) { - htime.Clock = clock.Start(time.Date(2021, 11, 17, 20, 34, 58, 651387237, time.UTC)) - t.Cleanup(func() { htime.Clock = clock.System() }) + htime.Clock = clocks.Start(time.Date(2021, 11, 17, 20, 34, 58, 651387237, time.UTC)) + t.Cleanup(func() { htime.Clock = clocks.System() }) past := time.Date(2009, 11, 17, 20, 34, 58, 651387237, time.UTC) future := time.Date(2037, 11, 17, 20, 34, 58, 651387237, time.UTC) zero := time.Time{}