Skip to content

Commit de8b910

Browse files
author
Mashama McFarlane
committed
Updated per code review suggestion @bobh66
Signed-off-by: Mashama McFarlane <[email protected]>
1 parent 63f632c commit de8b910

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

function_maps.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,12 @@ func getCredentialData(mReq map[string]any, credName string) map[string][]byte {
154154
return nil
155155
}
156156

157-
var data map[string][]byte
158157
switch req.GetCredentials()[credName].GetSource().(type) {
159158
case *fnv1.Credentials_CredentialData:
160-
data = req.GetCredentials()[credName].GetCredentialData().GetData()
159+
return req.GetCredentials()[credName].GetCredentialData().GetData()
161160
default:
162161
return nil
163162
}
164-
165-
return data
166163
}
167164

168165
func convertFromMap(mReq map[string]any) (*fnv1.RunFunctionRequest, error) {

0 commit comments

Comments
 (0)