m/p/msguid: init
Adds a new msguid package which contains functions for encoding and
decoding Microsoft's mixed-endian GUID/UUID format. This format is
used by Microsoft as well as a bunch of UEFI-related standards.
Change-Id: Icca8ef7ad7f7359808ea7f19e3824639f7b1e2eb
Reviewed-on: https://review.monogon.dev/c/monogon/+/1849
Tested-by: Jenkins CI
Reviewed-by: Serge Bazanski <serge@monogon.tech>
diff --git a/metropolis/pkg/msguid/BUILD.bazel b/metropolis/pkg/msguid/BUILD.bazel
new file mode 100644
index 0000000..9be5fdb
--- /dev/null
+++ b/metropolis/pkg/msguid/BUILD.bazel
@@ -0,0 +1,19 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+
+go_library(
+ name = "msguid",
+ srcs = ["msguid.go"],
+ importpath = "source.monogon.dev/metropolis/pkg/msguid",
+ visibility = ["//visibility:public"],
+ deps = ["@com_github_google_uuid//:uuid"],
+)
+
+go_test(
+ name = "msguid_test",
+ srcs = ["msguid_test.go"],
+ embed = [":msguid"],
+ deps = [
+ "@com_github_google_go_cmp//cmp",
+ "@com_github_google_uuid//:uuid",
+ ],
+)