advanced

command
v0.0.0-...-a594856 Latest Latest
Warning

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

Go to latest
Published: May 23, 2025 License: MIT Imports: 2 Imported by: 0

README

Advanced Example

Shows how to use various features of econf.

Run

  1. Set environment variables:
# Basic types
export CONFIG_HOST=localhost
export CONFIG_PORT=8080
export CONFIG_DEBUG=true

# Slices (comma-separated)
export CONFIG_TAGS=dev,prod,staging
export CONFIG_WEIGHTS=0.1,0.2,0.3

# Private field
export CONFIG_PASSWORD=secret123
# Or use file
echo "secret123" > password.txt
export CONFIG_PASSWORD_FILE=password.txt
  1. Run:
go run main.go

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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