configfile

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFile

func ReadFile(filepath string, model interface{}, filetype FileType) error

func WriteFile

func WriteFile(filepath string, model interface{}, filetype FileType) error

Types

type FileType

type FileType int
const (
	XML  FileType = iota
	JSON FileType = iota
	TOML FileType = iota
	YAML FileType = iota
)

func (FileType) Marshal

func (t FileType) Marshal() func(model interface{}) ([]byte, error)

func (FileType) Unmarshal

func (t FileType) Unmarshal() func(data []byte, model interface{}) error

Jump to

Keyboard shortcuts

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