Browse Source

improve godoc

Nicola Murino 6 years ago
parent
commit
5ffa34dacb
4 changed files with 5 additions and 2 deletions
  1. 1 0
      cmd/root.go
  2. 1 1
      logger/logger.go
  3. 1 0
      metrics/metrics.go
  4. 2 1
      service/service.go

+ 1 - 0
cmd/root.go

@@ -1,3 +1,4 @@
+// Package cmd provides Command Line Interface support
 package cmd
 
 import (

+ 1 - 1
logger/logger.go

@@ -5,7 +5,7 @@
 // The package provides a request logger to log the HTTP requests for REST API too.
 // The request logger uses chi.middleware.RequestLogger,
 // chi.middleware.LogFormatter and chi.middleware.LogEntry to build a structured
-// logger using zerlog
+// logger using zerolog
 package logger
 
 import (

+ 1 - 0
metrics/metrics.go

@@ -1,3 +1,4 @@
+// Package metrics provides Prometheus metrics support
 package metrics
 
 import (

+ 2 - 1
service/service.go

@@ -1,3 +1,4 @@
+// Package service allows to start and stop the SFTPGo service
 package service
 
 import (
@@ -83,7 +84,7 @@ func (s *Service) Wait() {
 	<-s.Shutdown
 }
 
-// Stop terminates the service and unblocks the Wait method
+// Stop terminates the service unblocking the Wait method
 func (s *Service) Stop() {
 	close(s.Shutdown)
 	logger.Debug(logSender, "", "Service stopped")