conf

package
v0.0.0-...-1c25370 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(file string, v any, opts ...Option) error

Load loads config into v from file, .json, .yaml and .yml are acceptable.

func LoadFromJsonBytes

func LoadFromJsonBytes(content []byte, v any) error

LoadFromJsonBytes loads config into v from content json bytes.

func LoadFromTomlBytes

func LoadFromTomlBytes(content []byte, v any) error

LoadFromTomlBytes loads config into v from content toml bytes.

func LoadFromYamlBytes

func LoadFromYamlBytes(content []byte, v any) error

LoadFromYamlBytes loads config into v from content yaml bytes.

Types

type Option

type Option func(opt *options)

Option defines the method to customize the config options.

func UseEnv

func UseEnv() Option

UseEnv customizes the config to use environment variables.

Directories

Path Synopsis
utils

Jump to

Keyboard shortcuts

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