config

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmoConfig

type EmoConfig struct {
	Text      string  `json:"text"               mapstructure:"text"`
	ScrollX   string  `json:"scroll-x,omitempty" mapstructure:"scroll-x"`
	ScrollY   string  `json:"scroll-y,omitempty" mapstructure:"scroll-y"`
	Revolve   string  `json:"revolve,omitempty"  mapstructure:"revolve"`
	Rotate    string  `json:"rotate,omitempty"   mapstructure:"rotate"`
	Pulsing   string  `json:"pulsing,omitempty"  mapstructure:"pulsing"`
	Speed     float64 `json:"speed,omitempty"    mapstructure:"speed"`
	Bg        string  `json:"bg,omitempty"       mapstructure:"bg"`
	FontColor string  `json:"font-color,omitempty" mapstructure:"font-color"`
	Out       string  `json:"out,omitempty"      mapstructure:"out"`
	Font      string  `json:"font,omitempty"     mapstructure:"font"`
}

EmoConfig はすべての設定を保持する中間表現です。 CLIフラグからもJSONファイルからも同じ構造体に変換できます。

func (*EmoConfig) SetDefaults

func (c *EmoConfig) SetDefaults()

SetDefaults はゼロ値フィールドにデフォルト値を設定します。 CLIパスではflag側のデフォルト値が使われますが、JSON設定パス向けのフォールバックです。

func (*EmoConfig) Validate

func (c *EmoConfig) Validate() error

Validate は設定の整合性を検証します。

Jump to

Keyboard shortcuts

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