config

package
v0.0.36 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: MIT Imports: 11 Imported by: 1 module, 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

Index

Constants

This section is empty.

Variables

View Source
var CFG = &Config{}

Functions

func Load

func Load() error

Load resolves the configuration from defaults, environment variables, command-line flags, and finally the Filo configuration file (which takes precedence). The resulting values are validated before returning.

Types

type Config

type Config struct {
	IgnorePID   bool
	ShowVersion bool
	JSON        bool
	Listen      string
	Command     string
	AuthToken   string
	// AllowedOrigins is a comma-separated list of origin host patterns
	// allowed to open the viewer websocket from another origin (e.g.
	// "crg.eti.br,localhost:1313"; filepath.Match wildcards work). Empty
	// keeps the library default: same-origin only.
	AllowedOrigins string
	Term           string
	ColorTerm      string
	Path           string
	InitFile       string
}

func (*Config) OriginPatterns added in v0.0.30

func (c *Config) OriginPatterns() []string

OriginPatterns returns AllowedOrigins as a pattern slice, nil when unset.

Jump to

Keyboard shortcuts

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