load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
load("@io_bazel_rules_docker//go:image.bzl", "go_image")

go_library(
    name = "main_lib",
    srcs = ["main.go"],
    importpath = "//dezendorf/applications/golink/cmd/main",
    visibility = ["//visibility:private"],
    deps = [
        "//dezendorf/applications/golink/internal/core",
        "//dezendorf/applications/golink/internal/database",
        "//dezendorf/applications/golink/internal/routes",
        "@com_github_julienschmidt_httprouter//:go_default_library"
    ]
)

go_binary(
    name = "linkserver",
    embed = [":main_lib"],
    visibility = ["//visibility:public"],
)

go_image(
    name = "linkimage",
    srcs = [":main_lib"],
    visibility = ["//visibility:public"],
)
