From 63cd9120836fe935bf39dc9b3a19ad44eab7f063 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Thu, 11 Sep 2025 15:45:37 -0700 Subject: [PATCH] os/user: simplify go:build The go:build constraint for these files is way too complicated, and can be simplified by using unix tag. Change-Id: Id8278db0ba799a4e951d3c976f77c7402bebb332 Reviewed-on: https://go-review.googlesource.com/c/go/+/703155 Reviewed-by: Ian Lance Taylor Reviewed-by: Mark Freeman Reviewed-by: Michael Knyszek LUCI-TryBot-Result: Go LUCI --- src/os/user/cgo_listgroups_unix.go | 2 +- src/os/user/getgrouplist_unix.go | 2 +- src/os/user/listgroups_unix.go | 2 +- src/os/user/listgroups_unix_test.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/os/user/cgo_listgroups_unix.go b/src/os/user/cgo_listgroups_unix.go index 6b88f30c55..bbf1886b3c 100644 --- a/src/os/user/cgo_listgroups_unix.go +++ b/src/os/user/cgo_listgroups_unix.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build (cgo || darwin) && !osusergo && (darwin || dragonfly || freebsd || (linux && !android) || netbsd || openbsd || solaris) +//go:build (cgo || darwin) && !osusergo && unix && !android && !aix package user diff --git a/src/os/user/getgrouplist_unix.go b/src/os/user/getgrouplist_unix.go index 81b4cb74f9..9b033b8981 100644 --- a/src/os/user/getgrouplist_unix.go +++ b/src/os/user/getgrouplist_unix.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build cgo && !osusergo && (dragonfly || freebsd || (!android && linux) || netbsd || openbsd || solaris) +//go:build cgo && !osusergo && unix && !android && !aix && !darwin package user diff --git a/src/os/user/listgroups_unix.go b/src/os/user/listgroups_unix.go index 570926fae0..f370ec19d7 100644 --- a/src/os/user/listgroups_unix.go +++ b/src/os/user/listgroups_unix.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build ((darwin || dragonfly || freebsd || (js && wasm) || wasip1 || (!android && linux) || netbsd || openbsd || solaris) && ((!cgo && !darwin) || osusergo)) || aix +//go:build (((unix && !android) || (js && wasm) || wasip1) && ((!cgo && !darwin) || osusergo)) || aix package user diff --git a/src/os/user/listgroups_unix_test.go b/src/os/user/listgroups_unix_test.go index 252eef07ee..2dbfa225e8 100644 --- a/src/os/user/listgroups_unix_test.go +++ b/src/os/user/listgroups_unix_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build ((darwin || dragonfly || freebsd || (js && wasm) || wasip1 || (!android && linux) || netbsd || openbsd || solaris) && ((!cgo && !darwin) || osusergo)) || aix +//go:build (((unix && !android) || (js && wasm) || wasip1) && ((!cgo && !darwin) || osusergo)) || aix package user -- 2.52.0