Skip to content

Commit a88a708

Browse files
authored
fix: remove timex package (#152)
1 parent acd6837 commit a88a708

3 files changed

Lines changed: 3 additions & 6 deletions

File tree

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ go 1.23.0
55
require (
66
github.com/hamba/logger/v2 v2.8.0
77
github.com/hamba/statter/v2 v2.6.0
8-
github.com/hamba/timex v1.2.0
98
github.com/json-iterator/go v1.1.12
109
github.com/segmentio/ksuid v1.0.4
1110
github.com/stretchr/testify v1.10.0

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ github.com/hamba/logger/v2 v2.8.0 h1:0JJnEhVW4sHGn4/9fPP0LsZXD2ytG+NrnrXCdM8/vmg
2121
github.com/hamba/logger/v2 v2.8.0/go.mod h1:V58KZPAmDEWi14dOZjbKDPFkdyvpGwxXtLzLkVTNBic=
2222
github.com/hamba/statter/v2 v2.6.0 h1:d64DL4p48xAW4M876jrtguuEFXFf6cDFJR0WxNCDKVI=
2323
github.com/hamba/statter/v2 v2.6.0/go.mod h1:5QpB06ilNfJNfXW5YYe4cHUlh1NGTjIlpKDv/nl7U8w=
24-
github.com/hamba/timex v1.2.0 h1:Q1SMJz38jg0y+De/5D/owwqaTOMlU1vAwYGn70n1ahs=
25-
github.com/hamba/timex v1.2.0/go.mod h1:dCLYOsXXo4mRHEEnkzZjGArTvK29prYcuKW/1QoVhAA=
2624
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
2725
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
2826
github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc=

http/middleware/middleware.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ import (
66
"errors"
77
"net"
88
"net/http"
9+
"time"
910

1011
"github.com/hamba/logger/v2"
1112
"github.com/hamba/logger/v2/ctx"
1213
"github.com/hamba/pkg/v2/http/request"
1314
"github.com/hamba/statter/v2"
1415
"github.com/hamba/statter/v2/reporter/prometheus"
1516
"github.com/hamba/statter/v2/tags"
16-
"github.com/hamba/timex/mono"
1717
"github.com/segmentio/ksuid"
1818
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
1919
)
@@ -82,9 +82,9 @@ func WithStats(name string, s *statter.Statter, h http.Handler) http.Handler {
8282

8383
wrap := newResponseWrapper(rw)
8484

85-
start := mono.Now()
85+
start := time.Now()
8686
h.ServeHTTP(wrap, req)
87-
dur := mono.Since(start)
87+
dur := time.Since(start)
8888

8989
t = append(t, tags.StatusCode("code-group", wrap.Status()))
9090
t = append(t, tags.Int("code", wrap.Status()))

0 commit comments

Comments
 (0)