From 7bf14a64d5ed8dd13b59985e6557adf38a79a695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Miri=C4=87?= <1009277+imiric@users.noreply.github.com> Date: Sun, 14 Apr 2024 22:15:37 +0200 Subject: [PATCH] docs(app): improve context docs --- app/context/context.go | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/app/context/context.go b/app/context/context.go index 26ede30..4bfb50e 100644 --- a/app/context/context.go +++ b/app/context/context.go @@ -24,23 +24,27 @@ import ( // the application to avoid direct dependencies on external systems, and make // testing easier. type Context struct { - Ctx context.Context - Version string // The static app version in the binary - VersionInit string // The app version the DB was initialized with - FS vfs.FileSystem - DataDir string - Env Environment - Logger *slog.Logger - UUIDGen func() string + Ctx context.Context // global context + FS vfs.FileSystem // filesystem + DataDir string // app data storage directory + Env Environment // process environment + Logger *slog.Logger // global logger + UUIDGen func() string // UUID generator // Standard streams Stdin io.Reader Stdout io.Writer Stderr io.Writer + // Stores DB *db.DB Store store.Store - User *models.User + User *models.User // current app user + + // Metadata + Version string // short semantic app version + VersionFull string // app version including Go runtime information + VersionInit string // app version the DB was initialized with } // Environment is the interface to the process environment.