MCPcopy Index your code
hub / github.com/coder/coder / caller

Function caller

coderd/coderdtest/authorize.go:284–296  ·  view source on GitHub ↗
(skip int)

Source from the content-addressed store, hash-verified

282}
283
284func caller(skip int) string {
285 pc, file, line, ok := runtime.Caller(skip + 1)
286 i := strings.Index(file, "coder")
287 if i >= 0 {
288 file = file[i:]
289 }
290 str := fmt.Sprintf("%s:%d", file, line)
291 if ok {
292 f := runtime.FuncForPC(pc)
293 str += " | " + filepath.Base(f.Name())
294 }
295 return str
296}
297
298func (r *RecordingAuthorizer) Authorize(ctx context.Context, subject rbac.Subject, action policy.Action, object rbac.Object) error {
299 if r.Wrapped == nil {

Callers 1

recordAuthorizeMethod · 0.85

Calls 1

NameMethod · 0.65

Tested by

no test coverage detected