Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFile ¶
CreateFile creates a file and returns its reference to work with it
func FileExists ¶
FileExists returns true if the file trully exists in the system, else return false
func IsValidFile ¶
IsValidFile verify if the file extension is valid
func SaveProcecess ¶
func SaveProcecess(procecess []*FakeProcess) (okay bool)
SaveProcecess saves all the procecess in a file to use the information later
Types ¶
type FakeProcess ¶
type FakeProcess struct { Pid int32 Name string Status string // Status returns the process status. Return value could be one of these. R: Running S: Sleep T: Stop I: Idle Z: Zombie W: Wait L: Lock The character is same within all supported platforms. User string CPU float64 Memory float32 Priority int32 }
FakeProcess contains the information about trully procecess only to simulate the procecess functionality
func GetProcecess ¶
func GetProcecess() (fakeProcecess []*FakeProcess)
GetProcecess returns all the procecess information fromthe system to simulate the functionality
func ReadProcecess ¶
func ReadProcecess(path string) (procecess []*FakeProcess)
ReadProcecess reads the procecess information stored in a csv file and puts them in a slice of *FakeProcess
func (*FakeProcess) ToArray ¶
func (proc *FakeProcess) ToArray() []string
ToArray converts the process information to an array to process the information