settings

package
v0.0.0-...-11fa3e6 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigFileName = "conf/app.json"
)

Variables

This section is empty.

Functions

func ReadConfig

func ReadConfig(dir string) error

Types

type Config

type Config struct {
	Debug       bool   // 开启 Debug
	Addr        string // 监听地址 默认为 ${defaultAddr}
	DBKey       string // 数据库密码 默认随机${defaultKeyLen}位字符
	Resource    string // 资源文件夹(相对路径) 为空表示使用内置资源 (可包含 lang static, views 文件夹)
	Lang        string // 默认语言 为空表示使用系统语言
	ViewPattern string // 模板文件名正则 为空表示 \.html$ (当有 views 文件夹时)
	// contains filtered or unexported fields
}
var AppConf *Config

func (*Config) AbsDir

func (c *Config) AbsDir() string

func (*Config) LangPath

func (c *Config) LangPath() string

func (*Config) StaticPath

func (c *Config) StaticPath() string

func (*Config) ViewPath

func (c *Config) ViewPath() string

Jump to

Keyboard shortcuts

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