Skip to content

v2.22.0

Latest

Choose a tag to compare

@richardwilkes richardwilkes released this 08 Oct 20:27
· 3 commits to main since this release
0c5242c

New & Improved

  • Added the xpprof package with StartCPUProfile and StopCPUProfile, which write a CPU profile to cpu_profile.prof in the current working directory. Calling start while already profiling, or stop while not profiling, is a no-op. Errors are logged rather than returned.
  • tid errors now name the rejected input: NewTID reports the invalid kind, and FromString and FromStringOfKind report the rejected string. FromStringOfKind now reports a well-formed TID of the wrong kind as a kind mismatch naming the expected kind, instead of the generic "invalid TID" error.

Bug Fixes

  • tid.IsValid, tid.IsKindAndValid, tid.FromString, and tid.FromStringOfKind now reject TIDs whose body contains carriage return or line feed characters. Previously such strings passed validation, because the base64 decoder used to check the body silently skips CR and LF.