From d7ab887234d58af0fe2587fcb90332285ea09186 Mon Sep 17 00:00:00 2001 From: sammyette Date: Fri, 19 Jul 2024 09:48:01 -0400 Subject: [PATCH] feat: allow builds for unix (#311) --- .github/workflows/build.yml | 2 +- execfile_unix.go | 2 +- execfile_windows.go | 2 +- init_windows.go | 2 +- job_unix.go | 2 +- job_windows.go | 2 +- pprof.go | 2 +- signal_unix.go | 2 +- signal_windows.go | 2 +- vars_darwin.go | 2 +- vars_linux.go => vars_unix.go | 2 +- vars_windows.go | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) rename vars_linux.go => vars_unix.go (96%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eeab8a2..f1fe1b1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,7 +29,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: '1.18.8' + go-version: '1.22.2' - name: Download Task run: 'sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d' - name: Build diff --git a/execfile_unix.go b/execfile_unix.go index 44f924a..82c738b 100644 --- a/execfile_unix.go +++ b/execfile_unix.go @@ -1,4 +1,4 @@ -// +build linux darwin +//go:build unix package main diff --git a/execfile_windows.go b/execfile_windows.go index 4b3feef..3d6ef61 100644 --- a/execfile_windows.go +++ b/execfile_windows.go @@ -1,4 +1,4 @@ -// +build windows +//go:build windows package main diff --git a/init_windows.go b/init_windows.go index 825069d..e76629b 100644 --- a/init_windows.go +++ b/init_windows.go @@ -1,4 +1,4 @@ -// +build windows +//go:build windows package main diff --git a/job_unix.go b/job_unix.go index 5029012..0a038b1 100644 --- a/job_unix.go +++ b/job_unix.go @@ -1,4 +1,4 @@ -// +build darwin linux +//go:build unix package main diff --git a/job_windows.go b/job_windows.go index 140a5d1..26818b5 100644 --- a/job_windows.go +++ b/job_windows.go @@ -1,4 +1,4 @@ -// +build windows +//go:build windows package main diff --git a/pprof.go b/pprof.go index 977eeb0..ac4ed55 100644 --- a/pprof.go +++ b/pprof.go @@ -1,4 +1,4 @@ -// +build pprof +//go:build pprof package main diff --git a/signal_unix.go b/signal_unix.go index 2e6c885..1564d93 100644 --- a/signal_unix.go +++ b/signal_unix.go @@ -1,4 +1,4 @@ -// +build darwin linux +//go:build unix package main diff --git a/signal_windows.go b/signal_windows.go index 42a9fff..2ed3370 100644 --- a/signal_windows.go +++ b/signal_windows.go @@ -1,4 +1,4 @@ -// +build windows +//go:build windows package main diff --git a/vars_darwin.go b/vars_darwin.go index 8ec83ba..43215d5 100644 --- a/vars_darwin.go +++ b/vars_darwin.go @@ -1,4 +1,4 @@ -// +build darwin +//go:build darwin package main diff --git a/vars_linux.go b/vars_unix.go similarity index 96% rename from vars_linux.go rename to vars_unix.go index e1160ba..f90fa55 100644 --- a/vars_linux.go +++ b/vars_unix.go @@ -1,4 +1,4 @@ -// +build linux +//go:build unix && !darwin package main diff --git a/vars_windows.go b/vars_windows.go index d1bd7b6..f724fc2 100644 --- a/vars_windows.go +++ b/vars_windows.go @@ -1,4 +1,4 @@ -// +build windows +//go:build windows package main