basic

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(ctx context.Context)

Types

type Config

type Config struct {
	Host    string `cfg:"host"     default:"localhost"`
	Port    int    `cfg:"port"     default:"8080"`
	PortPtr *int   `cfg:"port_ptr" default:"8080"`

	Duration    time.Duration  `cfg:"duration"     default:"1s"`
	DurationPtr *time.Duration `cfg:"duration_ptr" default:"2s"`

	// Database configuration
	DB struct {
		Pass string `cfg:"pass"` // DB_PASS environment variable
	}

	Fn      func()     // cannot be loaded, result is <nil>
	Channel <-chan int // cannot be loaded, result is <nil>
}

Jump to

Keyboard shortcuts

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