Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary +build tags #94

Merged
merged 1 commit into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cgotest/sysconf_cgotest.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
// +build darwin dragonfly freebsd linux netbsd openbsd solaris

package sysconf_cgotest

Expand Down
1 change: 0 additions & 1 deletion example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
// +build darwin dragonfly freebsd linux netbsd openbsd solaris

package sysconf_test

Expand Down
7 changes: 2 additions & 5 deletions mksysconf.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build ignore
// +build ignore

package main

Expand Down Expand Up @@ -33,16 +32,14 @@ func gensysconf(in, out, goos, goarch string) error {
return err
}

goBuild, build := goos, goos
goBuild := goos
if goarch != "" {
goBuild = fmt.Sprintf("%s && %s", goos, goarch)
build = fmt.Sprintf("%s,%s", goos, goarch)
}

r := fmt.Sprintf(`$1

//go:build %s
// +build %s`, goBuild, build)
//go:build %s`, goBuild)
cgoCommandRegex := regexp.MustCompile(`(cgo -godefs .*)`)
b = cgoCommandRegex.ReplaceAll(b, []byte(r))

Expand Down
1 change: 0 additions & 1 deletion sysconf_bsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build darwin || dragonfly || freebsd || netbsd || openbsd
// +build darwin dragonfly freebsd netbsd openbsd

package sysconf

Expand Down
1 change: 0 additions & 1 deletion sysconf_defs_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build ignore
// +build ignore

package sysconf

Expand Down
1 change: 0 additions & 1 deletion sysconf_defs_dragonfly.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build ignore
// +build ignore

package sysconf

Expand Down
1 change: 0 additions & 1 deletion sysconf_defs_freebsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build ignore
// +build ignore

package sysconf

Expand Down
1 change: 0 additions & 1 deletion sysconf_defs_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build ignore
// +build ignore

package sysconf

Expand Down
1 change: 0 additions & 1 deletion sysconf_defs_netbsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build ignore
// +build ignore

package sysconf

Expand Down
1 change: 0 additions & 1 deletion sysconf_defs_openbsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build ignore
// +build ignore

package sysconf

Expand Down
1 change: 0 additions & 1 deletion sysconf_defs_solaris.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build ignore
// +build ignore

package sysconf

Expand Down
1 change: 0 additions & 1 deletion sysconf_generic.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd
// +build darwin dragonfly freebsd linux netbsd openbsd

package sysconf

Expand Down
1 change: 0 additions & 1 deletion sysconf_posix.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build darwin || dragonfly || freebsd || linux || openbsd
// +build darwin dragonfly freebsd linux openbsd

package sysconf

Expand Down
1 change: 0 additions & 1 deletion sysconf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
// +build darwin dragonfly freebsd linux netbsd openbsd solaris

package sysconf_test

Expand Down
1 change: 0 additions & 1 deletion sysconf_unsupported.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris
// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris

package sysconf

Expand Down
1 change: 0 additions & 1 deletion sysconf_values_freebsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build ignore
// +build ignore

package sysconf

Expand Down
1 change: 0 additions & 1 deletion sysconf_values_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build ignore
// +build ignore

package sysconf

Expand Down
1 change: 0 additions & 1 deletion sysconf_values_netbsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build ignore
// +build ignore

package sysconf

Expand Down
1 change: 0 additions & 1 deletion zsysconf_defs_darwin.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion zsysconf_defs_dragonfly.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion zsysconf_defs_freebsd.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion zsysconf_defs_linux.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion zsysconf_defs_netbsd.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion zsysconf_defs_openbsd.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion zsysconf_defs_solaris.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion zsysconf_values_freebsd_386.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion zsysconf_values_freebsd_amd64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion zsysconf_values_freebsd_arm.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion zsysconf_values_freebsd_arm64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion zsysconf_values_freebsd_riscv64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion zsysconf_values_linux_386.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion zsysconf_values_linux_amd64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion zsysconf_values_linux_arm.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion zsysconf_values_linux_arm64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion zsysconf_values_linux_loong64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion zsysconf_values_linux_mips.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion zsysconf_values_linux_mips64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion zsysconf_values_linux_mips64le.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion zsysconf_values_linux_mipsle.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion zsysconf_values_linux_ppc64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion zsysconf_values_linux_ppc64le.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion zsysconf_values_linux_riscv64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion zsysconf_values_linux_s390x.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion zsysconf_values_netbsd_386.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion zsysconf_values_netbsd_amd64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion zsysconf_values_netbsd_arm.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion zsysconf_values_netbsd_arm64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading