core

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDataPath

func GetDataPath() string

GetDataPath returns the path of the JSON storage file.

func SaveData

func SaveData(data Data) error

SaveData saves the data to the JSON file. If there is an error marshalling or writing the file, it returns an error.

Types

type Data

type Data struct {
	Items []string `json:"items"`
}

Data represents the structure of the data saved in the JSON file.

func LoadData

func LoadData() (Data, error)

LoadData loads the data from the JSON file. If the file does not exist, it returns empty data without an error. If there is an error reading or unmarshalling the file, it returns an error.

Jump to

Keyboard shortcuts

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