You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gotrace_id/context_test.go

16 lines
261 B

2 years ago
package gotrace_id
import (
2 years ago
"context"
2 years ago
"testing"
)
func TestContext(t *testing.T) {
2 years ago
ctx1 := CustomTraceIdContext(context.Background())
2 years ago
t.Log(ctx1)
t.Log(GetTraceIdContext(ctx1))
ctx2 := context.Background()
t.Log(ctx2)
t.Log(GetTraceIdContext(ctx2))
2 years ago
}