Discover Packages
github.com/kiwiworks/rodent
system
opt
package
Version:
v0.4.8
Opens a new window with list of versions in this module.
Published: Oct 4, 2024
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
func Apply[Options any ](this *Options, opts ...Option [Options])
Apply sets the given options on the provided structure.
this is a pointer to the structure to configure.
opts are a list of configuration options to apply.
TryApply applies a list of TryOption functions to the given options and returns an error if any of the functions fail.
type Option[Options any ] func(opt *Options)
Option represents a function that configures an instance of the specified type Options by modifying its fields.
type TryOption[Options any ] func(opt *Options) error
TryOption defines a function type that modifies an Options object and returns an error if the modification fails.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.