From 551fb5263b92d26349dda5c6ea1eed4809a9afdd Mon Sep 17 00:00:00 2001 From: Krish Suchak Date: Tue, 21 Jan 2025 16:22:31 -0500 Subject: [PATCH] ready --- .github/workflows/ci.yaml | 3 ++- pkg/pkg.go.x | 24 ------------------------ pkg/platform/os_log_wrapper.c | 5 ----- pkg/platform/test/darwin_test.go | 2 +- 4 files changed, 3 insertions(+), 31 deletions(-) delete mode 100644 pkg/pkg.go.x delete mode 100644 pkg/platform/os_log_wrapper.c diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 66b0002..7cc77a1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -57,4 +57,5 @@ jobs: - name: Unit Tests with the Go CLI run: | echo 'somecredstorepass' | gnome-keyring-daemon --unlock - go test ./... -short -race -cover + go test ./... -short -race -cover -count=1 + diff --git a/pkg/pkg.go.x b/pkg/pkg.go.x deleted file mode 100644 index 62f6185..0000000 --- a/pkg/pkg.go.x +++ /dev/null @@ -1,24 +0,0 @@ -//go:build darwin -// +build darwin - -package pkg - -/* -#include -#include - -void logInfo(const char *message) { - os_log(OS_LOG_DEFAULT, "%{public}s", message); -} -*/ -import "C" -import ( - "unsafe" -) - -// logMessage logs an informational message to Unified Logging. -func LogMessage(message string) { - cMessage := C.CString(message) - defer C.free(unsafe.Pointer(cMessage)) // Free C string after use - C.logInfo(cMessage) // Call C function to log info -} diff --git a/pkg/platform/os_log_wrapper.c b/pkg/platform/os_log_wrapper.c deleted file mode 100644 index b220977..0000000 --- a/pkg/platform/os_log_wrapper.c +++ /dev/null @@ -1,5 +0,0 @@ -#include - -void log_to_unified(const char *message) { - os_log(OS_LOG_DEFAULT, "%{public}s", message); -} \ No newline at end of file diff --git a/pkg/platform/test/darwin_test.go b/pkg/platform/test/darwin_test.go index 8bfdda0..55244a6 100644 --- a/pkg/platform/test/darwin_test.go +++ b/pkg/platform/test/darwin_test.go @@ -32,5 +32,5 @@ func Test_PlatformMacOS(t *testing.T) { logger := darwin.GetLogger() assert.NotNil(t, logger) - logger.Info("Testing macOS logger VIRTRU") + logger.Info("Testing macOS logger") }