github.com/Rookout/GoSDK@v0.1.48/pkg/information/process_info.go (about) 1 package information 2 3 import ( 4 "github.com/go-errors/errors" 5 "os" 6 ) 7 8 func collectProcessId(information *AgentInformation) error { 9 information.ProcessId = uint32(os.Getpid()) 10 return nil 11 } 12 13 func collectCommandArgs(information *AgentInformation) error { 14 information.CommandArguments = os.Args[1:] 15 return nil 16 } 17 18 func collectExecutable(information *AgentInformation) error { 19 exec, err := os.Executable() 20 if err != nil { 21 return errors.New(err) 22 } 23 information.Executable = exec 24 return nil 25 }