diff --git a/web/api/status/main.go b/web/api/status/main.go index 5e18b1e..4a2daf6 100644 --- a/web/api/status/main.go +++ b/web/api/status/main.go @@ -26,6 +26,7 @@ type Status struct { Extras interface{} `json:"extras,omitempty"` } +// Register status module // @Summary Show Status of current API // @Description Show version and status // @Tags status diff --git a/web/main_test.go b/web/main_test.go index 75ec0ab..c043195 100644 --- a/web/main_test.go +++ b/web/main_test.go @@ -14,10 +14,8 @@ var ( func TestRun(t *testing.T) { assert := assert.New(t) - ModuleRegister(func(_ *gin.Engine, _ *Service) { - }) - s := &Service{AccessLog: true, Listen: "8.8.8.8:80"} + s.ModuleRegister(func(_ *gin.Engine, _ *Service) {}) // HTTP - failed err := s.Run() assert.Error(err) diff --git a/web/session.go b/web/session.go index 1ac918f..1cb6b85 100644 --- a/web/session.go +++ b/web/session.go @@ -6,7 +6,7 @@ import ( "github.com/gin-gonic/gin" ) -// LoadSessions starts session handling for s. +// LoadSession starts session handling for s. func (s *Service) LoadSession(r *gin.Engine) { store := cookie.NewStore([]byte(s.Session.Secret)) r.Use(sessions.Sessions(s.Session.Name, store))