From 2c9f80d84ba96314a1e3b8bc80ee699cf8d37899 Mon Sep 17 00:00:00 2001 From: Spencer Brower <6729162+sbrow@users.noreply.github.com> Date: Wed, 3 Jun 2026 11:25:43 -0400 Subject: [PATCH] fix: updated linter. --- templates/go/.golangci.yml | 7 +++++++ templates/go/flake.nix | 30 ++++++++++++++++++++++++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/templates/go/.golangci.yml b/templates/go/.golangci.yml index 25db871..daf4ab6 100644 --- a/templates/go/.golangci.yml +++ b/templates/go/.golangci.yml @@ -72,6 +72,13 @@ linters: disable-builtin: false exclusions: - "*.TableName" + sloglint: + attr-only: true + context: "scope" + key-naming-case: "camel" + static-msg: true + # no-raw-keys: true + msg-style: "lowercased" formatters: enable: - goimports diff --git a/templates/go/flake.nix b/templates/go/flake.nix index f4b4c0a..09e2596 100644 --- a/templates/go/flake.nix +++ b/templates/go/flake.nix @@ -58,17 +58,43 @@ settings.formatter.prettier = { excludes = [ + "assets/vendor/**" "public/**" "resources/js/modernizr.js" "storage/app/caniuse.json" + "templates/**" "*.md" ]; }; - programs.golangci-lint.enable = true; + # Appears to be broken? + programs.golangci-lint.enable = false; }; - process-compose.default.settings.processes = { + packages.default = pkgs.buildGoModule rec { + # pname = "package-name"; + version = "0.1.0"; + src = ./.; + vendorHash = "sha256-0000000000000000000000000000000000000000000="; + + env.CGO_ENABLED = 1; + buildInputs = [ pkgs.sqlite ]; + + # subPackages = [ ]; + + ldflags = [ + "-X git.verticalaxion.com/verticalaxion/sales-tracker-go/internal/config.Version=${version}" + ]; + + # postInstall = '' + # mkdir -p $out/lib + # cp -r ${src}/templates $out/lib/templates + # cp -r ${src}/assets $out/lib/assets + # ''; + }; + + # Run this with nix run .#dev + process-compose.dev.settings.processes = { mail.command = "${pkgs.mailhog}/bin/MailHog"; web.command = "${pkgs.air}/bin/air --"; };