mirror of
https://github.com/shirou/gopsutil.git
synced 2025-04-24 13:48:56 +08:00
format go program with go 1.5.2 "go fmt"
This commit is contained in:
parent
ef151b7ff7
commit
3a1fa5dc80
@ -6,7 +6,7 @@ import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/shirou/gopsutil/cpu"
|
||||
"github.com/shirou/gopsutil/internal/common"
|
||||
"github.com/shirou/gopsutil/internal/common"
|
||||
)
|
||||
|
||||
// GetDockerIDList returnes a list of DockerID.
|
||||
|
@ -3,10 +3,11 @@
|
||||
package mem
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"os/exec"
|
||||
"strconv"
|
||||
"strings"
|
||||
"errors"
|
||||
|
||||
"github.com/shirou/gopsutil/internal/common"
|
||||
)
|
||||
|
||||
|
@ -65,8 +65,8 @@ type NetInterfaceStat struct {
|
||||
}
|
||||
|
||||
type NetFilterStat struct {
|
||||
ConnTrackCount int64 `json:"conntrack_count"`
|
||||
ConnTrackMax int64 `json:"conntrack_max"`
|
||||
ConnTrackCount int64 `json:"conntrack_count"`
|
||||
ConnTrackMax int64 `json:"conntrack_max"`
|
||||
}
|
||||
|
||||
var constMap = map[string]int{
|
||||
|
@ -165,8 +165,8 @@ func NetProtoCounters(protocols []string) ([]NetProtoCountersStat, error) {
|
||||
// the currently in use conntrack count and the max.
|
||||
// If the file does not exist or is invalid it will return nil.
|
||||
func NetFilterCounters() ([]NetFilterStat, error) {
|
||||
countfile := common.HostProc("sys/net/netfilter/nf_conntrack_count")
|
||||
maxfile := common.HostProc("sys/net/netfilter/nf_conntrack_max")
|
||||
countfile := common.HostProc("sys/net/netfilter/nf_conntrack_count")
|
||||
maxfile := common.HostProc("sys/net/netfilter/nf_conntrack_max")
|
||||
|
||||
count, err := common.ReadInts(countfile)
|
||||
|
||||
@ -174,7 +174,7 @@ func NetFilterCounters() ([]NetFilterStat, error) {
|
||||
return nil, err
|
||||
}
|
||||
stats := make([]NetFilterStat, 0, 1)
|
||||
|
||||
|
||||
max, err := common.ReadInts(maxfile)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -5,9 +5,9 @@ package process
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/binary"
|
||||
"unsafe"
|
||||
"strings"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
|
||||
cpu "github.com/shirou/gopsutil/cpu"
|
||||
"github.com/shirou/gopsutil/internal/common"
|
||||
|
@ -12,8 +12,8 @@ import (
|
||||
"github.com/StackExchange/wmi"
|
||||
"github.com/shirou/w32"
|
||||
|
||||
"github.com/shirou/gopsutil/internal/common"
|
||||
cpu "github.com/shirou/gopsutil/cpu"
|
||||
"github.com/shirou/gopsutil/internal/common"
|
||||
net "github.com/shirou/gopsutil/net"
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user