Skip to content

Commit 24f29cd

Browse files
committed
fixups
1 parent 429136f commit 24f29cd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

internal/controllers/cluster/cluster_controller.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,18 +80,18 @@ type Reconciler struct {
8080
externalTracker external.ObjectTracker
8181
}
8282

83-
// LoggerCustomizer
84-
// FIXME: will be moved to a util package
83+
// LoggerCustomizer is a util to create a LoggerCustomizer.
84+
// FIXME: will be moved to a util package.
8585
func LoggerCustomizer(log logr.Logger, controllerName, kind string) func(_ logr.Logger, req reconcile.Request) logr.Logger {
8686
// FIXME: just a hack for now
8787
var rngSeed int64
8888
_ = binary.Read(crand.Reader, binary.LittleEndian, &rngSeed)
89-
randSource := rand.New(rand.NewSource(rngSeed))
89+
randSource := rand.New(rand.NewSource(rngSeed)) //nolint:gosec // weak rng is fine here.
9090

9191
return func(_ logr.Logger, req reconcile.Request) logr.Logger {
9292
// FIXME: TBD if we use the actual TraceID type here already
9393
tid := trace.TraceID{}
94-
randSource.Read(tid[:])
94+
_, _ = randSource.Read(tid[:])
9595
return log.
9696
WithValues("controller", controllerName).
9797
WithValues(kind, klog.KRef(req.Namespace, req.Name).String()).

0 commit comments

Comments
 (0)