EqualHexStringTraceIDs compares two trace ID strings and compares the resulting bytes after padding. Returns true unless there is a reason not to.
(a, b string)
| 117 | // resulting bytes after padding. Returns true unless there is a reason not |
| 118 | // to. |
| 119 | func EqualHexStringTraceIDs(a, b string) (bool, error) { |
| 120 | aa, err := HexStringToTraceID(a) |
| 121 | if err != nil { |
| 122 | return false, err |
| 123 | } |
| 124 | bb, err := HexStringToTraceID(b) |
| 125 | if err != nil { |
| 126 | return false, err |
| 127 | } |
| 128 | |
| 129 | return bytes.Equal(aa, bb), nil |
| 130 | } |
| 131 | |
| 132 | func PadTraceIDTo16Bytes(traceID []byte) []byte { |
| 133 | if len(traceID) > 16 { |