Skip to content

Commit

Permalink
Use math.MaxUint64 instead of 0xffffffffffffffff (jaegertracing#5295)
Browse files Browse the repository at this point in the history
<!--
!! Please DELETE this comment before posting.
We appreciate your contribution to the Jaeger project! πŸ‘‹πŸŽ‰
-->

Use the variables included in the go standard library to make the code
clearer

The same as jaegertracing#5294


## Description of the changes
- Math MaxUint64 is a constant currently defined in the go standard
library and can be used directly without having to define it repeatedly

## How was this change tested?
- no need

## Checklist
- [x] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [x] I have added unit tests for the new functionality
- [x] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `yarn lint` and `yarn test`

Signed-off-by: majorteach <csgcgl@126.com>
  • Loading branch information
majorteach authored Mar 24, 2024
1 parent 53592b3 commit cfc2871
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion model/adjuster/span_id_deduper.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package adjuster

import (
"errors"
"math"

"github.com/jaegertracing/jaeger/model"
)
Expand All @@ -42,7 +43,7 @@ const (
warningTooManySpans = "cannot assign unique span ID, too many spans in the trace"
)

var maxSpanID = model.NewSpanID(0xffffffffffffffff)
var maxSpanID = model.NewSpanID(math.MaxUint64)

type spanIDDeduper struct {
trace *model.Trace
Expand Down

0 comments on commit cfc2871

Please sign in to comment.