Last active
October 4, 2020 22:36
-
-
Save martinsson/3e3252d0f453ea7d4ee96df5bbd5df99 to your computer and use it in GitHub Desktop.
Error handling in go 3/3: the if statements have gone away. Finally!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tenantID, err1 := store.GetParameter("TENANT_ID") | |
clientID, err2 := store.GetParameter("CLIENT_ID") | |
clientSecret, err3 := store.GetParameter("CLIENT_SECRET") | |
globalErr := multierr.Combine(err1, err2, err3) | |
return connection{ | |
tenantID, | |
clientID, | |
clientSecret, | |
}, globalErr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment