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/BUILD b/scouting/BUILD
index 8a3b3f0..836e5c3 100644
--- a/scouting/BUILD
+++ b/scouting/BUILD
@@ -1,4 +1,4 @@
-load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test")
+load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
go_binary(
name = "sql_demo",
@@ -15,19 +15,3 @@
visibility = ["//visibility:private"],
deps = ["@com_github_mattn_go_sqlite3//:go-sqlite3"],
)
-
-go_library(
- name = "database",
- srcs = ["db.go"],
- importpath = "github.com/frc971/971-Robot-Code/scouting",
- target_compatible_with = ["@platforms//cpu:x86_64"],
- visibility = ["//visibility:private"],
- deps = ["@com_github_mattn_go_sqlite3//:go_default_library"],
-)
-
-go_test(
- name = "db_test",
- srcs = ["db_test.go"],
- embed = [":database"],
- target_compatible_with = ["@platforms//cpu:x86_64"],
-)