From 40d30f8a289004aac1306af3e3ca69159f89c1d9 Mon Sep 17 00:00:00 2001 From: WAKAYAMA Shirou Date: Wed, 23 Apr 2014 21:57:18 +0900 Subject: [PATCH] change NewProcess return value to *Process. --- process_linux.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/process_linux.go b/process_linux.go index b311889..d8ac609 100644 --- a/process_linux.go +++ b/process_linux.go @@ -10,11 +10,11 @@ import ( "strings" ) -func NewProcess(pid int32) (Process, error) { - p := Process{ +func NewProcess(pid int32) (*Process, error) { + p := &Process{ Pid: int32(pid), } - go fillFromStat(pid, &p) + go fillFromStat(pid, p) /* // user := parseInt32(fields[13]) @@ -101,8 +101,8 @@ func getState(status uint8) (string, error) { return "running", nil } -func processes() ([]Process, error) { - ret := make([]Process, 0) +func processes() ([]*Process, error) { + ret := make([]*Process, 0) pids, err := Pids() if err != nil {