Move to typical go project layout, fix golangci-lint warnings, update deps

This commit is contained in:
eleksir
2024-10-06 22:10:19 +03:00
parent 0b573aa169
commit 83970650b5
115 changed files with 9402 additions and 4920 deletions

View File

@@ -68,7 +68,12 @@ func (p *Process) NameWithContext(ctx context.Context) (string, error) {
}
func (p *Process) CwdWithContext(ctx context.Context) (string, error) {
return "", common.ErrNotImplementedError
mib := []int32{CTLKern, KernProcCwd, p.Pid}
buf, _, err := common.CallSyscall(mib)
if err != nil {
return "", err
}
return common.ByteToString(buf), nil
}
func (p *Process) ExeWithContext(ctx context.Context) (string, error) {