fixed by errcheck

This commit is contained in:
Shirou WAKAYAMA 2016-04-01 21:02:20 +09:00
parent da89408631
commit 944429d994
3 changed files with 8 additions and 9 deletions

View File

@ -11,7 +11,10 @@ import (
)
func DoSysctrl(mib string) ([]string, error) {
os.Setenv("LC_ALL", "C")
err := os.Setenv("LC_ALL", "C")
if err != nil {
return []string{}, err
}
out, err := exec.Command("/usr/sbin/sysctl", "-n", mib).Output()
if err != nil {
return []string{}, err

View File

@ -11,7 +11,10 @@ import (
)
func DoSysctrl(mib string) ([]string, error) {
os.Setenv("LC_ALL", "C")
err := os.Setenv("LC_ALL", "C")
if err != nil {
return []string{}, err
}
out, err := exec.Command("/sbin/sysctl", "-n", mib).Output()
if err != nil {
return []string{}, err

View File

@ -327,11 +327,6 @@ func (p *Process) MemoryMaps(grouped bool) (*[]MemoryMapsStat, error) {
return &ret, common.NotImplementedError
}
func copyParams(k *KinfoProc, p *Process) error {
return nil
}
func processes() ([]Process, error) {
results := make([]Process, 0, 50)
@ -364,8 +359,6 @@ func processes() ([]Process, error) {
if err != nil {
continue
}
copyParams(&k, p)
results = append(results, *p)
}