diff --git a/cmd/cruntar/BUILD.bazel b/cmd/cruntar/BUILD.bazel index 0eeec9f..bf72c28 100644 --- a/cmd/cruntar/BUILD.bazel +++ b/cmd/cruntar/BUILD.bazel @@ -5,7 +5,10 @@ go_library( srcs = ["main.go"], importpath = "git.wntrmute.dev/kyle/goutils/cmd/cruntar", visibility = ["//visibility:private"], - deps = ["//die"], + deps = [ + "//die", + "//fileutil", + ], ) go_binary( diff --git a/cmd/showimp/BUILD.bazel b/cmd/showimp/BUILD.bazel index e09b027..be9a1a0 100644 --- a/cmd/showimp/BUILD.bazel +++ b/cmd/showimp/BUILD.bazel @@ -6,8 +6,8 @@ go_library( importpath = "git.wntrmute.dev/kyle/goutils/cmd/showimp", visibility = ["//visibility:private"], deps = [ + "//dbg", "//die", - "//logging", ], ) diff --git a/fileutil/BUILD.bazel b/fileutil/BUILD.bazel index c6bb885..660faaa 100644 --- a/fileutil/BUILD.bazel +++ b/fileutil/BUILD.bazel @@ -2,8 +2,53 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") go_library( name = "fileutil", - srcs = ["fileutil.go"], + srcs = [ + "fileutil.go", + "fileutil_windows.go", + "symlinks.go", + ], importpath = "git.wntrmute.dev/kyle/goutils/fileutil", visibility = ["//visibility:public"], - deps = ["@org_golang_x_sys//unix"], + deps = select({ + "@io_bazel_rules_go//go/platform:aix": [ + "@org_golang_x_sys//unix", + ], + "@io_bazel_rules_go//go/platform:android": [ + "@org_golang_x_sys//unix", + ], + "@io_bazel_rules_go//go/platform:darwin": [ + "@org_golang_x_sys//unix", + ], + "@io_bazel_rules_go//go/platform:dragonfly": [ + "@org_golang_x_sys//unix", + ], + "@io_bazel_rules_go//go/platform:freebsd": [ + "@org_golang_x_sys//unix", + ], + "@io_bazel_rules_go//go/platform:illumos": [ + "@org_golang_x_sys//unix", + ], + "@io_bazel_rules_go//go/platform:ios": [ + "@org_golang_x_sys//unix", + ], + "@io_bazel_rules_go//go/platform:js": [ + "@org_golang_x_sys//unix", + ], + "@io_bazel_rules_go//go/platform:linux": [ + "@org_golang_x_sys//unix", + ], + "@io_bazel_rules_go//go/platform:netbsd": [ + "@org_golang_x_sys//unix", + ], + "@io_bazel_rules_go//go/platform:openbsd": [ + "@org_golang_x_sys//unix", + ], + "@io_bazel_rules_go//go/platform:plan9": [ + "@org_golang_x_sys//unix", + ], + "@io_bazel_rules_go//go/platform:solaris": [ + "@org_golang_x_sys//unix", + ], + "//conditions:default": [], + }), ) diff --git a/go.mod b/go.mod index 5a3c0e7..36f10c0 100644 --- a/go.mod +++ b/go.mod @@ -13,3 +13,5 @@ require ( golang.org/x/sys v0.0.0-20220412211240-33da011f77ad gopkg.in/yaml.v2 v2.4.0 ) + +require github.com/davecgh/go-spew v1.1.1 diff --git a/syslog/BUILD.bazel b/syslog/BUILD.bazel index 56acbf9..68a4e7b 100644 --- a/syslog/BUILD.bazel +++ b/syslog/BUILD.bazel @@ -1,17 +1,12 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library") -go_library( - name = "log", - srcs = ["logger.go"], - importpath = "git.wntrmute.dev/kyle/kdhcp/log", - visibility = ["//visibility:public"], - deps = ["@com_github_hashicorp_go_syslog//:go-syslog"], -) - go_library( name = "syslog", srcs = ["logger.go"], importpath = "git.wntrmute.dev/kyle/goutils/syslog", visibility = ["//visibility:public"], - deps = ["@com_github_hashicorp_go_syslog//:go-syslog"], + deps = [ + "@com_github_davecgh_go_spew//spew", + "@com_github_hashicorp_go_syslog//:go-syslog", + ], )