Documentation ¶
Overview ¶
Package config handles configurations for go-music, it saves config files about color themes, libraries caches and so on in software's work dir(in user's home dir).
Index ¶
Constants ¶
View Source
const WorkDirName = "go-music"
Variables ¶
This section is empty.
Functions ¶
func GenerateFile ¶
func GenerateFile(path string, c Configuration) error
func LoadConfigFromWorkDir ¶
func LoadConfigFromWorkDir(c Configuration) error
LoadConfigFromWorkDir reads config file in software's work dir(in user's home dir) and fills given Configuration with unmarshal config.
func SaveConfigInWorkDir ¶
func SaveConfigInWorkDir(c Configuration) error
Types ¶
type Configuration ¶
type LibraryConfiguration ¶
type LibraryConfiguration struct {
Libraries []Library
}
func (*LibraryConfiguration) FileName ¶
func (l *LibraryConfiguration) FileName() string
func (*LibraryConfiguration) Marshal ¶
func (l *LibraryConfiguration) Marshal() ([]byte, error)
func (*LibraryConfiguration) RemoveInvalid ¶
func (l *LibraryConfiguration) RemoveInvalid() (foundInvalid bool)
RemoveInvalid removes tracks not actually existing and reports if anything invalid was found.
func (*LibraryConfiguration) Unmarshal ¶
func (l *LibraryConfiguration) Unmarshal(data []byte) error
Click to show internal directories.
Click to hide internal directories.