package gotrace_id import ( "context" "testing" ) func TestContext(t *testing.T) { ctx1 := CustomTraceIdContext(context.Background()) t.Log(ctx1) t.Log(GetTraceIdContext(ctx1)) ctx2 := context.Background() t.Log(ctx2) t.Log(GetTraceIdContext(ctx2)) ctx3 := SetCustomTraceId(context.Background(), "23456") t.Log(ctx3) t.Log(GetTraceIdContext(ctx3)) }