config

package
v0.0.0-...-b67c493 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LangEnglish = "en-us"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Root        string
	UseMinified bool
	UseHashing  bool

	MaxFileSize int64
	Languages   []Language
	// contains filtered or unexported fields
}

func OpenFromEnv

func OpenFromEnv() (*Config, error)

func (*Config) GetAssetUrl

func (c *Config) GetAssetUrl(name string) string

func (*Config) GetLanguage

func (c *Config) GetLanguage(req *http.Request, setLang string) (t i18n.TranslateFunc, lang string)

func (*Config) GetLanguageByCode

func (c *Config) GetLanguageByCode(code string) Language

type Language

type Language struct {
	Code      string
	Iso       string
	Name      string
	ShortName string
}

Jump to

Keyboard shortcuts

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