Skip to content

Commit

Permalink
chore: go sys and fix build tags
Browse files Browse the repository at this point in the history
  • Loading branch information
VihasMakwana committed Dec 12, 2024
1 parent e8527ad commit 62fa6f3
Show file tree
Hide file tree
Showing 26 changed files with 30 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

Expand Down
2 changes: 1 addition & 1 deletion cgroup/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// control groups, a Linux kernel feature for grouping tasks to track and limit
// resource usage.
//
// Terminology
// # Terminology
//
// A cgroup is a collection of processes that are bound to a set of limits.
//
Expand Down
1 change: 1 addition & 0 deletions examples/ss/ss.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux
// +build linux

package main
Expand Down
1 change: 1 addition & 0 deletions examples/ss/ss_other.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !linux
// +build !linux

package main
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.22.9
require (
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.4.0
golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0
golang.org/x/sys v0.26.0
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0 h1:8H8QZJ30plJyIVj60H3lr8TZGIq2Fh3Cyrs/ZNg1foU=
golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo=
golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
Expand Down
1 change: 1 addition & 0 deletions psnotify/psnotify.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) 2012 VMware, Inc.

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

package psnotify
Expand Down
1 change: 1 addition & 0 deletions psnotify/psnotify_bsd.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) 2012 VMware, Inc.

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

// Go interface to BSD kqueue process events.
Expand Down
1 change: 1 addition & 0 deletions psnotify/psnotify_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) 2012 VMware, Inc.

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

package psnotify
Expand Down
3 changes: 2 additions & 1 deletion sigar_aix.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build aix
// +build aix

package gosigar
Expand Down Expand Up @@ -403,7 +404,7 @@ func (self *ProcState) Get(pid int) error {
return nil
}

//Get returns the current memory usage of a process
// Get returns the current memory usage of a process
func (self *ProcMem) Get(pid int) error {
info := C.struct_procsinfo64{}
cpid := C.pid_t(pid)
Expand Down
1 change: 1 addition & 0 deletions sigar_darwin.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !386
// +build !386

package gosigar
Expand Down
1 change: 1 addition & 0 deletions sigar_linux_common.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) 2012 VMware, Inc.

//go:build freebsd || linux
// +build freebsd linux

package gosigar
Expand Down
1 change: 1 addition & 0 deletions sigar_openbsd.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) 2016 Jasper Lievisse Adriaanse <[email protected]>.

//go:build openbsd
// +build openbsd

package gosigar
Expand Down
1 change: 1 addition & 0 deletions sigar_stub.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !aix && !darwin && !freebsd && !linux && !openbsd && !windows
// +build !aix,!darwin,!freebsd,!linux,!openbsd,!windows

package gosigar
Expand Down
1 change: 1 addition & 0 deletions sigar_unix.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) 2012 VMware, Inc.

//go:build aix || darwin || freebsd || linux
// +build aix darwin freebsd linux

package gosigar
Expand Down
1 change: 1 addition & 0 deletions sys/linux/inetdiag.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux
// +build linux

package linux
Expand Down
1 change: 1 addition & 0 deletions sys/linux/inetdiag_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux
// +build linux

package linux
Expand Down
1 change: 1 addition & 0 deletions sys/linux/netlink.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux
// +build linux

package linux
Expand Down
1 change: 1 addition & 0 deletions sys/linux/netlink_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux
// +build linux

package linux
Expand Down
1 change: 1 addition & 0 deletions sys/linux/sysconf_cgo.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux && cgo
// +build linux,cgo

package linux
Expand Down
1 change: 1 addition & 0 deletions sys/linux/sysconf_nocgo.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !cgo || !linux
// +build !cgo !linux

package linux
Expand Down
3 changes: 2 additions & 1 deletion sys/windows/fix_generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
// specific language governing permissions and limitations
// under the License.

//+build ignore
//go:build ignore
// +build ignore

package main

Expand Down
1 change: 1 addition & 0 deletions sys/windows/ntquery.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build windows
// +build windows

package windows
Expand Down
1 change: 1 addition & 0 deletions sys/windows/privileges.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build windows
// +build windows

package windows
Expand Down
1 change: 1 addition & 0 deletions sys/windows/privileges_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build windows
// +build windows

package windows
Expand Down
1 change: 1 addition & 0 deletions sys/windows/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build windows
// +build windows

package windows
Expand Down

0 comments on commit 62fa6f3

Please sign in to comment.