conf

package
v1.9.4 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package conf implements the configuration of the application. The configuration is loaded from the configuration file. The configuration file is a TOML file.

Example (Save)

Index

Examples

Constants

View Source
const (
	DefaultScopes       = "api read_user read_repository"
	DefaultCallbackHost = "localhost:2333"
)

Variables

This section is empty.

Functions

func ConfigPath added in v1.9.1

func ConfigPath(parent string) string

func Default

func Default() *types.Config

Default get default config which is embedded in the source file, so that this program could run without any configuration file.

func Load

func Load(confPath string, cfg types.ConfigHolder, must bool) (err error)

Load to load config from confPath with specified parser.

func NewTOMLParser

func NewTOMLParser() tomlParser

func Save

func Save(confPath string, c types.ConfigHolder) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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