code: func stackFrameInfoForError(skip int, err error) stackFrameInfo {
  	currentStack := captureStack(skip + 1)
  	currentlyCapturedStack := getCapturedStack(err)
  	if currentlyCapturedStack == nil || currentStack.id != currentlyCapturedStack.id {
  		// This is the very first annotation on this error OR
  		// We switched goroutines.
  		return stackFrameInfo{forStack: currentStack}
  	}
  	return stackFrameInfo{
  		frameIdx: currentlyCapturedStack.findPointOfDivergence(currentStack),
  		forStack: currentlyCapturedStack,
  	}
  }
docs: // stackFrameInfoForError returns a stackFrameInfo suitable for use to implement
  // the stackContexter interface.
  //
  // It skips the provided number of frames when collecting the current trace
  // (which should be equal to the number of functions between your error library
  // and the user's code).
  //
  // The returned stackFrameInfo will find the appropriate frame in the error's
  // existing stack information (if the error was created with errors.New), or
  // include the current stack if it was not.