fix func exporting.

pull/4/head
WAKAYAMA shirou 11 years ago
parent e4cee3c190
commit 6c201fdc5d

@ -13,8 +13,8 @@ import (
"strings"
)
// ReadLines read contents from file and split by new line.
func ReadLines(filename string) ([]string, error) {
// readLines read contents from file and split by new line.
func readLines(filename string) ([]string, error) {
f, err := os.Open(filename)
if err != nil {
return []string{""}, err

@ -12,7 +12,7 @@ func CPUTimes(percpu bool) ([]CPUTimesStat, error) {
var ret []CPUTimesStat
filename := "/proc/stat"
lines, _ := ReadLines(filename)
lines, _ := readLines(filename)
for _, line := range lines {
ct, err := parseStatLine(line)
if err != nil {

@ -17,7 +17,7 @@ func DiskPartitions(all bool) ([]DiskPartitionStat, error) {
var ret []DiskPartitionStat
filename := "/etc/mtab"
lines, err := ReadLines(filename)
lines, err := readLines(filename)
if err != nil {
return ret, err
}
@ -40,7 +40,7 @@ func DiskIOCounters() (map[string]DiskIOCountersStat, error) {
// determine partitions we want to look for
filename := "/proc/partitions"
lines, err := ReadLines(filename)
lines, err := readLines(filename)
if err != nil {
return ret, err
}
@ -62,7 +62,7 @@ func DiskIOCounters() (map[string]DiskIOCountersStat, error) {
}
filename = "/proc/diskstats"
lines, err = ReadLines(filename)
lines, err = readLines(filename)
if err != nil {
return ret, err
}

@ -8,7 +8,7 @@ import (
func NetIOCounters() ([]NetIOCountersStat, error) {
filename := "/proc/net/dev"
lines, err := ReadLines(filename)
lines, err := readLines(filename)
if err != nil {
return make([]NetIOCountersStat, 0), err
}

@ -8,7 +8,7 @@ import (
"testing"
)
func TestSendSignal(t *testing.T) {
func Test_SendSignal(t *testing.T) {
checkPid := os.Getpid()
p, _ := NewProcess(int32(checkPid))
Loading…
Cancel
Save