Add godoc documentation to exported types and methods
Add proper godoc comments to exported items in: - internal/globals: Appname, Version, Commit variables; Globals type; New function - internal/log: LogLevel type; level constants; Config type; Initialize, Fatal, Error, Warn, Notice, Info, Debug functions and variants; TTYHandler type and methods; Module variable; LogOptions type
This commit is contained in:
@@ -4,13 +4,16 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// these get populated from main() and copied into the Globals object.
|
||||
var (
|
||||
Appname string = "vaultik"
|
||||
Version string = "dev"
|
||||
Commit string = "unknown"
|
||||
)
|
||||
// Appname is the application name, populated from main().
|
||||
var Appname string = "vaultik"
|
||||
|
||||
// Version is the application version, populated from main().
|
||||
var Version string = "dev"
|
||||
|
||||
// Commit is the git commit hash, populated from main().
|
||||
var Commit string = "unknown"
|
||||
|
||||
// Globals contains application-wide configuration and metadata.
|
||||
type Globals struct {
|
||||
Appname string
|
||||
Version string
|
||||
@@ -18,6 +21,7 @@ type Globals struct {
|
||||
StartTime time.Time
|
||||
}
|
||||
|
||||
// New creates and returns a new Globals instance initialized with the package-level variables.
|
||||
func New() (*Globals, error) {
|
||||
return &Globals{
|
||||
Appname: Appname,
|
||||
|
||||
Reference in New Issue
Block a user