Closed paulbdavis closed 4 years ago
Basing off the environments example yields a similar error.
package env
import (
"mytestmodule/env/targets"
"github.com/aws/aws-sdk-go/aws/session"
sparta "github.com/mweagle/Sparta"
gocf "github.com/mweagle/go-cloudformation"
"github.com/sirupsen/logrus"
)
// ServiceDecoratorHook returns a service decorator hook with the supplied
// tags
func ServiceDecoratorHook() sparta.ServiceDecoratorHookFunc {
return func(context map[string]interface{},
serviceName string,
template *gocf.Template,
S3Bucket string,
buildID string,
awsSession *session.Session,
noop bool,
logger *logrus.Logger) error {
template.Outputs["Environment"] = &gocf.Output{
Description: "Sparta Config target environment",
Value: targets.Stage,
}
return nil
}
}
env/default.go:15:9: cannot use func literal (type func(map[string]interface {}, string, *"github.com/mweagle/go-cloudformation".Template, string, string, *session.Session, bool, *logrus.Logger) error) as type sparta.ServiceDecoratorHookFunc in return argument
Patched up the example with https://github.com/mweagle/SpartaConfig/commit/0e4f554d2d1e7531de7c065f203f795f23c93abc
Yeah, that fixes the issue. Sorry, I didn't check the code from the example repo as closely.
I am trying to run the example for the environment setup and I am running into the following issue
in
env/default.go
When trying to run with no build tags specified I get a compilation error
I've checked all of the function args and I don't see anything I'm missing.