]> Cypherpunks repositories - gostls13.git/commitdiff
os/user: simplify go:build
authorKir Kolyshkin <kolyshkin@gmail.com>
Thu, 11 Sep 2025 22:45:37 +0000 (15:45 -0700)
committerKirill Kolyshkin <kolyshkin@gmail.com>
Sat, 27 Sep 2025 02:38:54 +0000 (19:38 -0700)
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 <iant@golang.org>
Reviewed-by: Mark Freeman <markfreeman@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/os/user/cgo_listgroups_unix.go
src/os/user/getgrouplist_unix.go
src/os/user/listgroups_unix.go
src/os/user/listgroups_unix_test.go

index 6b88f30c55d852b0bca64e6cd1c3c151157e7fad..bbf1886b3c0277c206f23d64e29ddaf899de76a0 100644 (file)
@@ -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
 
index 81b4cb74f90b92ca0308a4e03b300d9a8a96db18..9b033b89815e31f9226a6715b6a75efbcd7c175f 100644 (file)
@@ -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
 
index 570926fae0fa75e688d046e7a4ec71224641a441..f370ec19d7d8d33518ca003a506e3b4e173a1557 100644 (file)
@@ -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
 
index 252eef07ee57189061adc7bb1f93ed1d5052a7ab..2dbfa225e8d16198cf2aa6f747f7a8cb60097f98 100644 (file)
@@ -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