build/bindata: delete unused tooling

Change-Id: I4febbc6b5a8bf8dc9aa6aa1c56e5ae70214974ef
Reviewed-on: https://review.monogon.dev/c/monogon/+/3773
Tested-by: Jenkins CI
Reviewed-by: Hendrik Hofstadt <hendrik@monogon.tech>
diff --git a/build/bazel/go.MODULE.bazel b/build/bazel/go.MODULE.bazel
index 1a9285f..9d8c2b6 100644
--- a/build/bazel/go.MODULE.bazel
+++ b/build/bazel/go.MODULE.bazel
@@ -38,7 +38,6 @@
     "com_github_insomniacslk_dhcp",
     "com_github_joho_godotenv",
     "com_github_kballard_go_shellquote",
-    "com_github_kevinburke_go_bindata",
     "com_github_klauspost_compress",
     "com_github_lib_pq",
     "com_github_mattn_go_shellwords",
diff --git a/build/bindata/BUILD.bazel b/build/bindata/BUILD.bazel
deleted file mode 100644
index e69de29..0000000
--- a/build/bindata/BUILD.bazel
+++ /dev/null
diff --git a/build/bindata/README.md b/build/bindata/README.md
deleted file mode 100644
index e7cd8f1..0000000
--- a/build/bindata/README.md
+++ /dev/null
@@ -1,34 +0,0 @@
-##Bindata
-
-This rule uses [go-bindata](https://github.com/kevinburke/go-bindata) to package arbitrary go files.
-Please refer to the documentation there on how to use the packaged data.
-
-Generally this rule is very similar to the `bindata` rule in the default go bazel package.
-However this rule also creates an embeddable go library right away.
-
-###How to use
-
-Add the files you want to package to the `srcs` attribute, set the `package` attribute to the 
-go package you want the result to be in and embed the rule into a `go_library`.
-
-####Example: Packaging sql migrations
-
-These rules package all `.sql` files into the target and make it accessible at `importpath` in the package `models`. 
-```
-
-go_library(
-    name = "go_default_library",
-    embed = [
-        ":migrations_pack",
-    ],
-    importpath = "source.monogon.dev/golibs/minijob/generated/sql",
-    visibility = ["//visibility:public"],
-)
-
-bindata(
-    name = "migrations_pack",
-    package = "models",
-    srcs = glob(["*.sql"]),
-)
-
-```
diff --git a/build/bindata/bindata.bzl b/build/bindata/bindata.bzl
deleted file mode 100644
index a10b543..0000000
--- a/build/bindata/bindata.bzl
+++ /dev/null
@@ -1,78 +0,0 @@
-#  Copyright 2020 The Monogon Project Authors.
-#
-#  SPDX-License-Identifier: Apache-2.0
-#
-#  Licensed under the Apache License, Version 2.0 (the "License");
-#  you may not use this file except in compliance with the License.
-#  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License.
-
-load(
-    "@io_bazel_rules_go//go:def.bzl",
-    "go_context",
-)
-
-def _bindata_impl(ctx):
-    out = ctx.actions.declare_file("bindata.go")
-
-    arguments = ctx.actions.args()
-    arguments.add_all([
-        "-pkg",
-        ctx.attr.package,
-        "-prefix",
-        ctx.label.workspace_root,
-        "-o",
-        out,
-    ])
-    arguments.add_all(ctx.files.srcs)
-
-    ctx.actions.run(
-        inputs = ctx.files.srcs,
-        outputs = [out],
-        executable = ctx.file.bindata,
-        arguments = [arguments],
-    )
-
-    go = go_context(ctx)
-
-    source_files = [out]
-
-    library = go.new_library(
-        go,
-        srcs = source_files,
-    )
-    source = go.library_to_source(go, None, library, False)
-    providers = [library, source]
-    output_groups = {
-        "go_generated_srcs": source_files,
-    }
-
-    return providers + [OutputGroupInfo(**output_groups)]
-
-bindata = rule(
-    implementation = _bindata_impl,
-    attrs = {
-        "srcs": attr.label_list(
-            mandatory = True,
-            allow_files = True,
-        ),
-        "package": attr.string(
-            mandatory = True,
-        ),
-        "bindata": attr.label(
-            allow_single_file = True,
-            default = Label("@com_github_kevinburke_go_bindata//go-bindata"),
-        ),
-        "_go_context_data": attr.label(
-            default = "@io_bazel_rules_go//:go_context_data",
-        ),
-    },
-    toolchains = ["@io_bazel_rules_go//go:toolchain"],
-)
diff --git a/build/sqlc/sqlc.bzl b/build/sqlc/sqlc.bzl
index cfaa3b1..985a301 100644
--- a/build/sqlc/sqlc.bzl
+++ b/build/sqlc/sqlc.bzl
@@ -55,8 +55,7 @@
     importpath_parts = ctx.attr.importpath.split("/")
     package_name = importpath_parts[-1]
 
-    # Split migrations into 'up' and 'down'. Only pass 'up' to sqlc. Use both
-    # to generate golang-migrate compatible bindata.
+    # Split migrations into 'up' and 'down'. Only pass 'up' to sqlc.
     uppers, _ = _parse_migrations(ctx.files.migrations)
 
     # Make sure given queries have no repeating basenames. This ensures clean
@@ -158,12 +157,6 @@
             executable = True,
             cfg = "exec",
         ),
-        "_bindata": attr.label(
-            default = Label("@com_github_kevinburke_go_bindata//go-bindata"),
-            allow_single_file = True,
-            executable = True,
-            cfg = "exec",
-        ),
     },
     toolchains = ["@io_bazel_rules_go//go:toolchain"],
 )
diff --git a/build/sqlc/tool-dep/gomod-generated-placeholder.go b/build/sqlc/tool-dep/gomod-generated-placeholder.go
index 5f3b39c..1f6e0f9 100644
--- a/build/sqlc/tool-dep/gomod-generated-placeholder.go
+++ b/build/sqlc/tool-dep/gomod-generated-placeholder.go
@@ -6,7 +6,6 @@
 package main
 
 import (
-	_ "github.com/kevinburke/go-bindata"
 	_ "github.com/sqlc-dev/sqlc/pkg/cli"
 )