Exports OTEL initialization function and adds extensive documentation across packages for improved clarity.

This commit is contained in:
2025-08-13 16:01:51 -04:00
parent 31fc6dca16
commit 318115690d
16 changed files with 50 additions and 23 deletions

View File

@@ -6,11 +6,11 @@ import (
js "github.com/swaggest/jsonschema-go"
)
// Generates json schema for app's config.AppConfig
func (app *App) Schema() ([]byte, error) {
// Schema generates json schema for app's config.AppConfig
func (a *App) Schema() ([]byte, error) {
r := js.Reflector{}
s, err := r.Reflect(*app.cfg)
s, err := r.Reflect(*a.cfg)
if err != nil {
return nil, err
}
@@ -18,7 +18,7 @@ func (app *App) Schema() ([]byte, error) {
return json.MarshalIndent(s, "", " ")
}
// Generates json schema for custom config
// CustomSchema generates json schema for custom config
// which embeds *config.AppConfig into it
// Panics if no *config.AppConfig is embedded into custom
// config type