defaults

package
v0.48.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2026 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package defaults fills the zero fields of a configuration struct with their default value, so every Config in platform follows the same rule: zero means default, negative is invalid.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Set

func Set[T ~int | ~int64](name string, field *T, def T) error

Set sets a zero *field to def and rejects a negative one with an error naming the field. The caller wraps the error with its own sentinel.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL