prysm-pulse/encoding/bytesutil/BUILD.bazel
Preston Van Loon 1e3a55c6a6
Refactor bytesutil, add support for go1.20 slice to array conversions (#11838)
* Refactor bytes.go and bytes_test.go to smaller files, introduce go1.17 and go1.20 style of array copy

* rename bytes_go17.go to reflect that it works on any version 1.19 and below

* fix PadTo when len is exactly the size

* Add go1.20 style conversions

* Forgot another int method

Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2023-01-10 16:41:01 +00:00

40 lines
991 B
Python

load("@prysm//tools/go:def.bzl", "go_library", "go_test")
go_library(
name = "go_default_library",
srcs = [
"bits.go",
"bytes.go",
"bytes_go120.go",
"bytes_legacy.go",
"eth_types.go",
"hex.go",
"integers.go",
],
importpath = "github.com/prysmaticlabs/prysm/v3/encoding/bytesutil",
visibility = ["//visibility:public"],
deps = [
"//config/fieldparams:go_default_library",
"//consensus-types/primitives:go_default_library",
"@com_github_pkg_errors//:go_default_library",
],
)
go_test(
name = "go_default_test",
size = "small",
srcs = [
"bits_test.go",
"bytes_test.go",
"eth_types_test.go",
"hex_test.go",
"integers_test.go",
],
deps = [
":go_default_library",
"//config/fieldparams:go_default_library",
"//testing/assert:go_default_library",
"//testing/require:go_default_library",
],
)