settings

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package settings is the registry of who owns each section of osapi's config and its defaults. A DSL definition declares the defaults of the values it owns (command.Config for a process, behavior.Config for a behavior), and package config reads them from here to make each key. It imports nothing of osapi, so a DSL and config both import it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Own

func Own(
	prefix string,
	by string,
	defaults any,
)

Own records that by owns the section prefix, with defaults. Two owners of one section is a mistake of the code, so it panics, as a group registered twice does.

Types

type Owner

type Owner struct {
	// Prefix is the section, such as controller.
	Prefix string
	// By names the definition, such as controller start.
	By string
	// Defaults is a value of the section's type whose fields are the
	// defaults of its keys.
	Defaults any
}

Owner is the definition that owns a section of the config.

func Of

func Of(
	prefix string,
) (Owner, bool)

Of is the owner of the section prefix.

Jump to

Keyboard shortcuts

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