I'm trying to unit test a lambda function. Looking at the docs (https://docs.aws.amazon.com/sdk-for-go/api/service/lambda/lambdaiface) I'm not sure how to achieve it. The example given is non working and I cannot see any other usage of it. Particularly confusing to me is
func myFunc(svc lambdaiface.LambdaAPI) bool {
// Make svc.AddLayerVersionPermission request
}
as AddLayerVersionPermission does not return a bool so again I'm confused with expected usage. I'm also unsure if I'm meant to mock out every function individually which would be tedious. Can anyone give me any pointers or working examples? Ultimately I only want to mock out Invoke()
Thanks
I tried reading the documentation but it was unclear to me.