Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ef08927a50 | ||
|
|
6d209d3612 |
@@ -11,7 +11,7 @@ require (
|
|||||||
github.com/go-kratos/kratos/v2 v2.8.4
|
github.com/go-kratos/kratos/v2 v2.8.4
|
||||||
github.com/google/uuid v1.6.0
|
github.com/google/uuid v1.6.0
|
||||||
github.com/stretchr/testify v1.10.0
|
github.com/stretchr/testify v1.10.0
|
||||||
github.com/tx7do/go-utils v1.1.13
|
github.com/tx7do/go-utils v1.1.14
|
||||||
go.opentelemetry.io/otel v1.35.0
|
go.opentelemetry.io/otel v1.35.0
|
||||||
google.golang.org/protobuf v1.36.6
|
google.golang.org/protobuf v1.36.6
|
||||||
)
|
)
|
||||||
|
|||||||
2
tag.bat
2
tag.bat
@@ -1,4 +1,4 @@
|
|||||||
git tag v1.1.14
|
git tag v1.1.15
|
||||||
|
|
||||||
git tag bank_card/v1.1.4
|
git tag bank_card/v1.1.4
|
||||||
git tag geoip/v1.1.4
|
git tag geoip/v1.1.4
|
||||||
|
|||||||
@@ -165,3 +165,18 @@ func DurationpbToNumber[T int | int8 | int16 | int32 | int64 | uint | uint8 | ui
|
|||||||
secondsWithPrecision := T(seconds / timePrecision.Seconds())
|
secondsWithPrecision := T(seconds / timePrecision.Seconds())
|
||||||
return &secondsWithPrecision
|
return &secondsWithPrecision
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func DurationToDurationpb(duration *time.Duration) *durationpb.Duration {
|
||||||
|
if duration == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return durationpb.New(*duration)
|
||||||
|
}
|
||||||
|
|
||||||
|
func DurationpbToDuration(duration *durationpb.Duration) *time.Duration {
|
||||||
|
if duration == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
d := duration.AsDuration()
|
||||||
|
return &d
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user