Skip to content

Commit eb02c4b

Browse files
author
Nicholas Thomson
committed
Update the method GoDoc
1 parent 4ce2c17 commit eb02c4b

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

pkg/generate/code/resource_reference.go

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -192,18 +192,16 @@ func ReferenceFieldsPresent(
192192
//
193193
// ```
194194
//
195-
// if ko.Spec.JWTConfiguration != nil {
196-
// if ko.Spec.JWTConfiguration.IssuerRef != nil && ko.Spec.JWTConfiguration.IssuerRef.From != nil {
197-
// arr := ko.Spec.JWTConfiguration.IssuerRef.From
198-
// if arr == nil || arr.Name == nil || *arr.Name == "" {
199-
// return fmt.Errorf("provided resource reference is nil or empty: \"JWTConfiguration.IssuerRef"\")
200-
// }
201-
// obj := &svcapitypes.API{}
202-
// if err := getReferencedResourceState_API(ctx, apiReader, obj, *arr.Name, namespace); err != nil {
203-
// return err
204-
// }
205-
// ko.Spec.JWTConfiguration.Issuer = obj.Status.APIID
195+
// if ko.Spec.APIRef != nil && ko.Spec.APIRef.From != nil {
196+
// arr := ko.Spec.APIRef.From
197+
// if arr == nil || arr.Name == nil || *arr.Name == "" {
198+
// return fmt.Errorf("provided resource reference is nil or empty: APIRef")
206199
// }
200+
// obj := &svcapitypes.API{}
201+
// if err := getReferencedResourceState_API(ctx, apiReader, obj, *arr.Name, namespace); err != nil {
202+
// return err
203+
// }
204+
// ko.Spec.APIID = (*string)(obj.Status.APIID)
207205
// }
208206
//
209207
// ```

0 commit comments

Comments
 (0)