From a6412e43345f3ee3f048a04c7bef4a9d2c4372ba Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Mon, 13 Jan 2025 17:12:03 +0100 Subject: [PATCH] Remove redundant lines from PrepareReplacementsUser (#2130) They are not necessary because they are added below. Also, they will cause a crash if u.Name is nil. --- libs/testdiff/golden.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/libs/testdiff/golden.go b/libs/testdiff/golden.go index 02213c88a..08d1e9608 100644 --- a/libs/testdiff/golden.go +++ b/libs/testdiff/golden.go @@ -185,8 +185,6 @@ func PrepareReplacementsUser(t testutil.TestingT, r *ReplacementsContext, u iam. u.DisplayName, u.UserName, iamutil.GetShortUserName(&u), - u.Name.FamilyName, - u.Name.GivenName, } if u.Name != nil { names = append(names, u.Name.FamilyName)