Documentation ¶
Overview ¶
Package file provides functionality to load and save marshal files
Index ¶
- func NewSaveJSONWorker(repeat time.Duration, path string, data interface{}) *worker.Worker
- func ReadJSON(path string, data interface{}) error
- func ReadTOML(file string, data interface{}) error
- func SaveJSON(outputFile string, data interface{}) error
- func SaveTOML(outputFile string, data interface{}) error
- type TOMLDuration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSaveJSONWorker ¶
NewSaveJSONWorker Starts a worker, which save periodly data to json file
Types ¶
type TOMLDuration ¶ added in v1.2.0
TOMLDuration a time.Duration inside toml files
func (TOMLDuration) MarshalText ¶ added in v1.2.0
func (d TOMLDuration) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler
func (*TOMLDuration) UnmarshalText ¶ added in v1.2.0
func (d *TOMLDuration) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler
Click to show internal directories.
Click to hide internal directories.