Bump github.com/bep/clock v0.3.0 to renamed github.com/bep/clocks v0.5.0

This commit is contained in:
Anthony Fok 2023-07-03 18:53:49 -06:00 committed by Bjørn Erik Pedersen
parent d912491f2d
commit bf7ee8a91a
6 changed files with 9 additions and 13 deletions

View file

@ -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-v2="v1.18.1"
github.com/aws/aws-sdk-go="v1.44.284" github.com/aws/aws-sdk-go="v1.44.284"
github.com/aws/smithy-go="v1.13.5" 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/clocks="v0.5.0"
github.com/bep/debounce="v1.2.0" github.com/bep/debounce="v1.2.0"
github.com/bep/gitmap="v1.1.2" github.com/bep/gitmap="v1.1.2"

View file

@ -30,7 +30,7 @@ import (
"go.uber.org/automaxprocs/maxprocs" "go.uber.org/automaxprocs/maxprocs"
"github.com/bep/clock" "github.com/bep/clocks"
"github.com/bep/lazycache" "github.com/bep/lazycache"
"github.com/bep/logg" "github.com/bep/logg"
"github.com/bep/overlayfs" "github.com/bep/overlayfs"
@ -173,7 +173,7 @@ func (r *rootCommand) ConfigFromConfig(key int32, oldConf *commonConfig) (*commo
if !configs.Base.C.Clock.IsZero() { if !configs.Base.C.Clock.IsZero() {
// TODO(bep) find a better place for this. // 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{ return &commonConfig{
@ -283,7 +283,7 @@ func (r *rootCommand) ConfigFromProvider(key int32, cfg config.Provider) (*commo
if !base.C.Clock.IsZero() { if !base.C.Clock.IsZero() {
// TODO(bep) find a better place for this. // 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 { if base.PrintPathWarnings {

View file

@ -18,7 +18,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/bep/clock" "github.com/bep/clocks"
"github.com/spf13/cast" "github.com/spf13/cast"
"github.com/gohugoio/locales" "github.com/gohugoio/locales"
@ -75,7 +75,7 @@ var (
"December", "December",
} }
Clock = clock.System() Clock = clocks.System()
) )
func NewTimeFormatter(ltr locales.Translator) TimeFormatter { func NewTimeFormatter(ltr locales.Translator) TimeFormatter {

3
go.mod
View file

@ -6,7 +6,7 @@ require (
github.com/alecthomas/chroma/v2 v2.8.0 github.com/alecthomas/chroma/v2 v2.8.0
github.com/armon/go-radix v1.0.0 github.com/armon/go-radix v1.0.0
github.com/aws/aws-sdk-go v1.43.5 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/debounce v1.2.0
github.com/bep/gitmap v1.1.2 github.com/bep/gitmap v1.1.2
github.com/bep/goat v0.5.0 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/ssooidc v1.14.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.18.3 // 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/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/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/dlclark/regexp2 v1.10.0 // indirect github.com/dlclark/regexp2 v1.10.0 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect github.com/go-openapi/jsonpointer v0.19.5 // indirect

2
go.sum
View file

@ -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 h1:hgz0X/DX0dGqTYpGALqXJoRKRj5oQ7150i5FdTePzO8=
github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= 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/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 h1:hhvKVGLPQWRVsBP/UB7ErrHYIO42gINVbvqxvYTPVps=
github.com/bep/clocks v0.5.0/go.mod h1:SUq3q+OOq41y2lRQqH5fsOoxN8GbxSiT6jvoVVLCVhU= github.com/bep/clocks v0.5.0/go.mod h1:SUq3q+OOq41y2lRQqH5fsOoxN8GbxSiT6jvoVVLCVhU=
github.com/bep/debounce v1.2.0 h1:wXds8Kq8qRfwAOpAxHrJDbCXgC5aHSzgQb/0gKsHQqo= github.com/bep/debounce v1.2.0 h1:wXds8Kq8qRfwAOpAxHrJDbCXgC5aHSzgQb/0gKsHQqo=

View file

@ -22,7 +22,7 @@ import (
"testing" "testing"
"time" "time"
"github.com/bep/clock" "github.com/bep/clocks"
"github.com/gohugoio/hugo/identity" "github.com/gohugoio/hugo/identity"
"github.com/gohugoio/hugo/markup/asciidocext" "github.com/gohugoio/hugo/markup/asciidocext"
"github.com/gohugoio/hugo/markup/rst" "github.com/gohugoio/hugo/markup/rst"
@ -1502,8 +1502,8 @@ func TestShouldBuild(t *testing.T) {
} }
func TestShouldBuildWithClock(t *testing.T) { func TestShouldBuildWithClock(t *testing.T) {
htime.Clock = clock.Start(time.Date(2021, 11, 17, 20, 34, 58, 651387237, time.UTC)) htime.Clock = clocks.Start(time.Date(2021, 11, 17, 20, 34, 58, 651387237, time.UTC))
t.Cleanup(func() { htime.Clock = clock.System() }) t.Cleanup(func() { htime.Clock = clocks.System() })
past := time.Date(2009, 11, 17, 20, 34, 58, 651387237, time.UTC) past := time.Date(2009, 11, 17, 20, 34, 58, 651387237, time.UTC)
future := time.Date(2037, 11, 17, 20, 34, 58, 651387237, time.UTC) future := time.Date(2037, 11, 17, 20, 34, 58, 651387237, time.UTC)
zero := time.Time{} zero := time.Time{}