feat(goswagger): Continue on goswagger template
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Matthieu 'JP' DERASSE 2023-01-09 19:45:28 +00:00
parent 65add2a61d
commit 9683e21ed4
Signed by: mderasse
GPG Key ID: 55141C777B16A705
4 changed files with 10 additions and 3 deletions

View File

@ -51,6 +51,7 @@ type Config struct {
{{ pascalize .Name }}API
{{ end -}}
Logger func(string, ...interface{})
// InnerMiddleware is for the handler executors. These do not apply to the swagger.json document.
// The middleware executes after routing but before authentication, binding and validation
InnerMiddleware func(http.Handler) http.Handler

View File

@ -33,6 +33,12 @@ func main() {
logrus.WithError(err).Fatal("fail to initialize gocommon.log")
}
// Initialize listenAddress
listenAddress, err := server.GetListenAddressFromEnvOrFlags()
if err != nil {
logger.WithError(err).Fatal("fail to initalize listenAddress")
}
// Initialize tracing
logger.Info("Initializing tracing")
tp, err := tracing.Init()
@ -62,7 +68,7 @@ func main() {
}
srv := http.Server{
Addr: ":8081",
Addr: listenAddress,
Handler: h,
IdleTimeout: 30 * time.Second,
ReadHeaderTimeout: 2 * time.Second,