config

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "unknown"

Version contains the version of LURE. If the version isn't known, it'll be set to "unknown"

Functions

func Config

func Config(ctx context.Context) *types.Config

Config returns a LURE configuration struct. The first time it's called, it'll load the config from a file. Subsequent calls will just return the same value.

func Language

func Language(ctx context.Context) language.Tag

Language returns the system language. The first time it's called, it'll detect the langauge based on the $LANG environment variable. Subsequent calls will just return the same value.

func SystemLang

func SystemLang() string

SystemLang returns the system language based on the $LANG environment variable.

Types

type Paths

type Paths struct {
	ConfigDir  string
	ConfigPath string
	CacheDir   string
	RepoDir    string
	PkgsDir    string
	DBPath     string
}

Paths contains various paths used by LURE

func GetPaths

func GetPaths(ctx context.Context) *Paths

GetPaths returns a Paths struct. The first time it's called, it'll generate the struct using information from the system. Subsequent calls will return the same value.

Jump to

Keyboard shortcuts

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