config

package
v0.0.0-...-edc77cd Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const VERSION = "0.1.0"

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Mouse bool `mapstrcture:"mouse" json:"mouse"`
}

type Config

type Config struct {
	App App `mapstrcture:"app" json:"app"`
	Pip Pip `mapstrcture:"pip" json:"pip"`
	Log Log `mapstrcture:"log" json:"log"`
}

Config is a structure contains configuratons data

func Load

func Load() (*Config, error)

Load reads config file Create default config file if is not exist in OS user config dir

type Log

type Log struct {
	Prefix    string `mapstructure:"prefix" json:"prefix"`
	Directory string `mapstructure:"directory" json:"directory"`
	Level     string `mapstructure:"level" json:"level"`
}

type Pip

type Pip struct {
	IndexURL     string `mapstructure:"index-url" json:"indexURL"`
	SearchURL    string `mapstructure:"search-url" json:"searchURL"`
	ListPageSize int    `mapstructure:"list-page-size" json:"listPageSize"`
	Timeout      int    `mapstructure:"timeout" json:"timeout"`
}

Jump to

Keyboard shortcuts

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