From f1a0bf07f0521e01ae9ef7b810bbf527d5f56582 Mon Sep 17 00:00:00 2001 From: Fools Date: Tue, 18 Jun 2024 00:18:21 +0100 Subject: [PATCH] go idoms change --- sdk/trace/id_generator.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sdk/trace/id_generator.go b/sdk/trace/id_generator.go index 925bcf99305..7f887265dcd 100644 --- a/sdk/trace/id_generator.go +++ b/sdk/trace/id_generator.go @@ -66,10 +66,9 @@ func (gen *randomIDGenerator) NewIDs(ctx context.Context) (trace.TraceID, trace. for { _, _ = gen.randSource.Read(sid[:]) if sid.IsValid() { - break + return tid, sid } } - return tid, sid } func defaultIDGenerator() IDGenerator {