Move scouting/db.go into its own directory
Our Go tooling (i.e. gazelle) gets confused when the directory name
doesn't match the `package` name. I couldn't get it to resolve the
dependency on the `db` package.
This patch fixes that by moving the code (plus test) into its own
directory.
Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: I7f57912966d0a8f677782318b1d6ea2042b8b0cb
diff --git a/scouting/db/BUILD b/scouting/db/BUILD
new file mode 100644
index 0000000..e89332d
--- /dev/null
+++ b/scouting/db/BUILD
@@ -0,0 +1,17 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+
+go_library(
+ name = "db",
+ srcs = ["db.go"],
+ importpath = "github.com/frc971/971-Robot-Code/scouting/db",
+ target_compatible_with = ["@platforms//cpu:x86_64"],
+ visibility = ["//visibility:public"],
+ deps = ["@com_github_mattn_go_sqlite3//:go-sqlite3"],
+)
+
+go_test(
+ name = "db_test",
+ srcs = ["db_test.go"],
+ embed = [":db"],
+ target_compatible_with = ["@platforms//cpu:x86_64"],
+)