MCPcopy Create free account
hub / github.com/imroc/req / appendFileLine

Function appendFileLine

internal/bisect/bisect.go:410–427  ·  view source on GitHub ↗

appendFileLine appends file:line to dst, returning the extended slice.

(dst []byte, file string, line int)

Source from the content-addressed store, hash-verified

408
409// appendFileLine appends file:line to dst, returning the extended slice.
410func appendFileLine(dst []byte, file string, line int) []byte {
411 dst = append(dst, file...)
412 dst = append(dst, ':')
413 u := uint(line)
414 if line < 0 {
415 dst = append(dst, '-')
416 u = -u
417 }
418 var buf [24]byte
419 i := len(buf)
420 for i == len(buf) || u > 0 {
421 i--
422 buf[i] = '0' + byte(u%10)
423 u /= 10
424 }
425 dst = append(dst, buf[i:]...)
426 return dst
427}
428
429// MatchStack assigns the current call stack a change ID.
430// If the stack should be printed, MatchStack prints it.

Callers 2

printFileLineFunction · 0.85
printStackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…