Documentation ¶
Overview ¶
Package config はアプリの設定("config.json")を管理するオブジェクトのパッケージです。
このオブジェクトには、ソートなどに使われる質問、質問の表示時間などの情報が含まれます。
Index ¶
- Constants
- type Config
- func (c *Config) FileUsed() string
- func (c *Config) GetQuery() *query.Query
- func (c *Config) GetQueryDescription() string
- func (c *Config) GetQueryObjective() []string
- func (c *Config) GetQuerySubjective() []string
- func (c *Config) IsDefaultConf() bool
- func (c *Config) Load() error
- func (c *Config) OverWrite() error
- func (c *Config) SaveAs(pathFile string) error
Constants ¶
View Source
const NameConf = "config.json"
NameConf はアプリ設定のファイル名です。
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
Config は viper.Viper 型(github.com/spf13/viper)を埋め込んだ、アプリの設定 情報を保持する拡張型です。
func (*Config) GetQueryDescription ¶
GetQueryDescription は質問一覧の説明文を返します。
func (*Config) GetQueryObjective ¶
GetQueryObjective は質問一覧のうち、客観的な質問を返します。
func (*Config) GetQuerySubjective ¶
GetQuerySubjective は質問一覧のうち、主観的な質問を返します。
func (*Config) IsDefaultConf ¶
IsDefaultConf は設定ファイルが存在せずデフォルトの設定を使っている場合に true を返します。
Click to show internal directories.
Click to hide internal directories.