MCPcopy Index your code
hub / github.com/keploy/keploy / extractIDFromStatusLine

Function extractIDFromStatusLine

utils/utils.go:1057–1066  ·  view source on GitHub ↗

extractIDFromStatusLine extracts the ID from a status line in the format "Key:\tValue".

(line string)

Source from the content-addressed store, hash-verified

1055
1056// extractIDFromStatusLine extracts the ID from a status line in the format "Key:\tValue".
1057func extractIDFromStatusLine(line string) int {
1058 fields := strings.Fields(line)
1059 if len(fields) == 2 {
1060 id, err := strconv.Atoi(fields[1])
1061 if err == nil {
1062 return id
1063 }
1064 }
1065 return -1
1066}
1067
1068// findChildPIDs takes a parent PID and returns a slice of all descendant PIDs.
1069func findChildPIDs(parentPID int) ([]int, error) {

Callers 1

getProcessGroupIDFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected