[#38] added lint and used the lint suggestions

This commit is contained in:
Valley
2022-07-09 22:17:41 +08:00
committed by GitHub
parent dfd9528847
commit d64fbf9011
36 changed files with 110 additions and 65 deletions
+2 -2
View File
@@ -41,11 +41,11 @@ func NewServeCommand(app core.App, showStartBanner bool) *cobra.Command {
}
// configure cors
router.Use(middleware.CORSWithConfig(middleware.CORSConfig(middleware.CORSConfig{
router.Use(middleware.CORSWithConfig(middleware.CORSConfig{
Skipper: middleware.DefaultSkipper,
AllowOrigins: allowedOrigins,
AllowMethods: []string{http.MethodGet, http.MethodHead, http.MethodPut, http.MethodPatch, http.MethodPost, http.MethodDelete},
})))
}))
// ensure that the latest migrations are applied before starting the server
if err := runMigrations(app); err != nil {