From 3bcb719122f30409fd4e2c37587684dbb4f89ba3 Mon Sep 17 00:00:00 2001 From: Devin Wong Date: Mon, 15 Apr 2024 22:06:55 -0700 Subject: [PATCH] add comment --- pkg/nbcontracthelper/helper.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/nbcontracthelper/helper.go b/pkg/nbcontracthelper/helper.go index 265dc421737..cdb35aac598 100644 --- a/pkg/nbcontracthelper/helper.go +++ b/pkg/nbcontracthelper/helper.go @@ -36,6 +36,8 @@ func ensureConfigsNonNil(v *nbcontractv1.Configuration) *nbcontractv1.Configurat return v } +// Creates a new instance of nbcontractv1.Configuration and ensures that +// all fields are non-nil unless it's set as proto3 explicit presence (with label optional). func NewNBContractConfiguration(v *nbcontractv1.Configuration) *nbcontractv1.Configuration { return ensureConfigsNonNil(v) }