From db2321a7549f0b923204fc86f4b5cd161496b53f Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Wed, 29 May 2024 15:11:45 +0200 Subject: [PATCH] chore: update build directives --- flock_aix.go | 2 +- flock_unix.go | 7 ++++--- flock_winapi.go | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/flock_aix.go b/flock_aix.go index 7277c1b..5692ef2 100644 --- a/flock_aix.go +++ b/flock_aix.go @@ -13,7 +13,7 @@ // This code is adapted from the Go package: // cmd/go/internal/lockedfile/internal/filelock -//+build aix +//go:build aix package flock diff --git a/flock_unix.go b/flock_unix.go index c315a3e..4455642 100644 --- a/flock_unix.go +++ b/flock_unix.go @@ -2,7 +2,7 @@ // Use of this source code is governed by the BSD 3-Clause // license that can be found in the LICENSE file. -// +build !aix,!windows +//go:build !aix && !windows package flock @@ -171,8 +171,9 @@ retry: // reopenFDOnError determines whether we should reopen the file handle // in readwrite mode and try again. This comes from util-linux/sys-utils/flock.c: -// Since Linux 3.4 (commit 55725513) -// Probably NFSv4 where flock() is emulated by fcntl(). +// +// Since Linux 3.4 (commit 55725513) +// Probably NFSv4 where flock() is emulated by fcntl(). func (f *Flock) reopenFDOnError(err error) (bool, error) { if err != syscall.EIO && err != syscall.EBADF { return false, nil diff --git a/flock_winapi.go b/flock_winapi.go index fe405a2..d291033 100644 --- a/flock_winapi.go +++ b/flock_winapi.go @@ -2,7 +2,7 @@ // Use of this source code is governed by the BSD 3-Clause // license that can be found in the LICENSE file. -// +build windows +//go:build windows package flock