From 93097bf4956879a3284ed23f64004207742a2d3e Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Wed, 9 Aug 2023 18:54:02 +0200 Subject: [PATCH] Removed obsolete +build directives in favor of modern go:build --- serial_darwin_64.go | 5 ++--- serial_resetbuf_linux_bsd.go | 2 +- serial_specialbaudrate_linux.go | 5 ++--- serial_unix.go | 1 - unixutils/pipe.go | 2 +- unixutils/select.go | 2 +- 6 files changed, 7 insertions(+), 10 deletions(-) diff --git a/serial_darwin_64.go b/serial_darwin_64.go index 7f72e66..2318a6d 100644 --- a/serial_darwin_64.go +++ b/serial_darwin_64.go @@ -1,12 +1,11 @@ -// +build darwin -// +build amd64 arm64 - // // Copyright 2014-2021 Cristian Maglie. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +//go:build darwin && (amd64 || arm64) + package serial import "golang.org/x/sys/unix" diff --git a/serial_resetbuf_linux_bsd.go b/serial_resetbuf_linux_bsd.go index c6e1a4a..8895ce1 100644 --- a/serial_resetbuf_linux_bsd.go +++ b/serial_resetbuf_linux_bsd.go @@ -4,7 +4,7 @@ // license that can be found in the LICENSE file. // -// +build linux freebsd openbsd +//go:build linux || freebsd || openbsd package serial diff --git a/serial_specialbaudrate_linux.go b/serial_specialbaudrate_linux.go index d6baffb..3a105eb 100644 --- a/serial_specialbaudrate_linux.go +++ b/serial_specialbaudrate_linux.go @@ -1,12 +1,11 @@ -// +build linux -// +build !ppc64le - // // Copyright 2014-2021 Cristian Maglie. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +//go:build linux && !ppc64le + package serial import "golang.org/x/sys/unix" diff --git a/serial_unix.go b/serial_unix.go index c19513c..6f58d98 100644 --- a/serial_unix.go +++ b/serial_unix.go @@ -5,7 +5,6 @@ // //go:build linux || darwin || freebsd || openbsd -// +build linux darwin freebsd openbsd package serial diff --git a/unixutils/pipe.go b/unixutils/pipe.go index f187ce9..311c801 100644 --- a/unixutils/pipe.go +++ b/unixutils/pipe.go @@ -4,7 +4,7 @@ // license that can be found in the LICENSE file. // -// +build linux darwin freebsd openbsd +//go:build linux || darwin || freebsd || openbsd package unixutils diff --git a/unixutils/select.go b/unixutils/select.go index e945ec1..12705d8 100644 --- a/unixutils/select.go +++ b/unixutils/select.go @@ -4,7 +4,7 @@ // license that can be found in the LICENSE file. // -// +build linux darwin freebsd openbsd +//go:build linux || darwin || freebsd || openbsd package unixutils