conf

package
v0.0.0-...-9625bed Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: GPL-3.0 Imports: 4 Imported by: 21

README

Library that reads and saves from/to JSON configs in ~/.config directory.

Documentation

Overview

Library for reading and parsing config files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfigFromFile

func LoadConfigFromFile(appName string, object interface{}) error

Loads data from the gob file in the config directory: $HOME/.config/{appName}.gob

func LoadConfigFromJson

func LoadConfigFromJson(appName string, object interface{}) error

Loads data from the JSON file in the config directory: $HOME/.config/{appName}.json

func LoadFromFile

func LoadFromFile(filePath string, object interface{}) error

Loads data from the gob file.

func LoadFromJson

func LoadFromJson(filePath string, object interface{}) error

Loads data from the JSON file.

func SaveConfigToFile

func SaveConfigToFile(appName string, object interface{}) error

Saves data from the gob file in the config directory: $HOME/.config/{appName}.gob

func SaveToFile

func SaveToFile(filePath string, object interface{}) error

Saves data to the gob file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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