Exports OTEL initialization function and adds extensive documentation across packages for improved clarity.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user