Skip to content

Commit dee144f

Browse files
committed
fix(lint): simplify embedded field access in claimconditions.go
- Remove redundant .Condition prefix when accessing embedded struct fields (fixes staticcheck QF1008) Signed-off-by: Alper Rifat Ulucinar <ulucinar@users.noreply.github.com>
1 parent e788e93 commit dee144f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

claimconditions.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ func UpdateClaimConditions(rsp *fnv1.RunFunctionResponse, conditions ...Targeted
4343
// transformCondition converts a TargetedCondition to be compatible with the Protobuf SDK
4444
func transformCondition(tc TargetedCondition) *fnv1.Condition {
4545
c := &fnv1.Condition{
46-
Type: string(tc.Condition.Type),
47-
Reason: string(tc.Condition.Reason),
46+
Type: string(tc.Type),
47+
Reason: string(tc.Reason),
4848
Target: transformTarget(tc.Target),
4949
}
5050

51-
switch tc.Condition.Status {
51+
switch tc.Status {
5252
case corev1.ConditionTrue:
5353
c.Status = fnv1.Status_STATUS_CONDITION_TRUE
5454
case corev1.ConditionFalse:

0 commit comments

Comments
 (0)