utils

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrReadFile      = errors.New("unable to read file")
	ErrUnknownFormat = errors.New("unknown format")
)

Functions

func GetStage added in v1.0.3

func GetStage() string

func GetWorkingDir

func GetWorkingDir() string

func WriteStruct added in v0.1.16

func WriteStruct(writer io.Writer, format Format, data any) error

func WriteStructToFile added in v0.1.16

func WriteStructToFile(filePath string, format Format, data any) error

Types

type Format added in v0.1.16

type Format string
const (
	Unknown Format = ""
	JSON    Format = "json"
	YAML    Format = "yaml"
)

func ReadStruct added in v0.1.16

func ReadStruct(r io.Reader, out any) (Format, error)

func ReadStructFromFile added in v0.1.16

func ReadStructFromFile(filePath string, out any) (Format, error)

type Stage added in v0.1.2

type Stage string
const (
	Prod Stage = "prod"
)

type VersionInformation added in v0.1.2

type VersionInformation struct {
	Version   string
	BuildDate string
	CommitID  string
	Branch    string
	Stage     Stage
}

func GetVersionInformation added in v0.1.2

func GetVersionInformation() VersionInformation

Jump to

Keyboard shortcuts

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