From 13ffb81cab2e7a307f6fb89ddc79dc71781b1268 Mon Sep 17 00:00:00 2001 From: Jeremie Fraeys Date: Sun, 8 Mar 2026 13:10:00 -0400 Subject: [PATCH] fix: add CGO build tags to consistency tests, remove unused isHex function --- internal/auth/api_key.go | 10 ---------- tests/integration/consistency/cmd/update.go | 3 +++ tests/integration/consistency/dataset_hash_test.go | 3 +++ 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/internal/auth/api_key.go b/internal/auth/api_key.go index 1eadfc4..b4bb897 100644 --- a/internal/auth/api_key.go +++ b/internal/auth/api_key.go @@ -373,13 +373,3 @@ func GenerateNewAPIKey(admin bool, roles []string, permissions map[string]bool) return plaintext, entry, nil } - -// isHex checks if a string contains only hex characters -func isHex(s string) bool { - for _, c := range s { - if !((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F')) { - return false - } - } - return len(s) > 0 -} diff --git a/tests/integration/consistency/cmd/update.go b/tests/integration/consistency/cmd/update.go index bf4f4d4..2bddc1e 100644 --- a/tests/integration/consistency/cmd/update.go +++ b/tests/integration/consistency/cmd/update.go @@ -1,3 +1,6 @@ +//go:build cgo +// +build cgo + // Command update computes expected hashes for fixtures using the reference Go implementation package main diff --git a/tests/integration/consistency/dataset_hash_test.go b/tests/integration/consistency/dataset_hash_test.go index 5b28b8c..073611a 100644 --- a/tests/integration/consistency/dataset_hash_test.go +++ b/tests/integration/consistency/dataset_hash_test.go @@ -1,3 +1,6 @@ +//go:build cgo +// +build cgo + package consistency import (