From 4b6e7072dad7ab61a20b63e62277a6652a96e5b4 Mon Sep 17 00:00:00 2001 From: Spencer Brower <6729162+sbrow@users.noreply.github.com> Date: Tue, 26 May 2026 17:06:20 -0400 Subject: [PATCH] feat(go): Added depguard rules. --- templates/go/.air.toml | 1 + templates/go/.golangci.yml | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 templates/go/.air.toml diff --git a/templates/go/.air.toml b/templates/go/.air.toml new file mode 100644 index 0000000..1c3a1eb --- /dev/null +++ b/templates/go/.air.toml @@ -0,0 +1 @@ +tmp_dir = "var/air" diff --git a/templates/go/.golangci.yml b/templates/go/.golangci.yml index ccd7927..7dbb613 100644 --- a/templates/go/.golangci.yml +++ b/templates/go/.golangci.yml @@ -49,6 +49,23 @@ linters: - varnamelen - wsl_v5 settings: + depguard: + rules: + main: + list-mode: strict + files: + "**/main.go" + allow: + - "$gostd" + catchall: + list-mode: strict + files: + - "!$test" + - "!**/main.go" + - "**/internal/**" + allow: + - "$gostd" + - "golang.org/**" recvcheck: disable-builtin: false exclusions: