30 lines
662 B
Python
30 lines
662 B
Python
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
|
|
|
|
go_library(
|
|
name = "timeutil",
|
|
srcs = ["time.go"],
|
|
importpath = "github.com/pingcap/tidb/util/timeutil",
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//util/logutil",
|
|
"@org_uber_go_atomic//:atomic",
|
|
"@org_uber_go_zap//:zap",
|
|
],
|
|
)
|
|
|
|
go_test(
|
|
name = "timeutil_test",
|
|
timeout = "short",
|
|
srcs = [
|
|
"main_test.go",
|
|
"time_test.go",
|
|
],
|
|
embed = [":timeutil"],
|
|
flaky = True,
|
|
deps = [
|
|
"//testkit/testsetup",
|
|
"@com_github_stretchr_testify//require",
|
|
"@org_uber_go_goleak//:goleak",
|
|
],
|
|
)
|