utils

package
v0.0.0-...-2cefbdd Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertTestCondition

func AssertTestCondition(t *testing.T, expected any, received any, errorMessage string)

func ConvertJson

func ConvertJson(model any) (string, error)

func DeleteFile

func DeleteFile(path string) error

func FileExists

func FileExists(path string) bool

func HomeFilePath

func HomeFilePath(path string) string

func ISODate

func ISODate(t time.Time) string

func ISODateNow

func ISODateNow() string

func ParseJson

func ParseJson[T any](content io.Reader) (T, error)

func PrintChessBoard

func PrintChessBoard(tiles string)

func PrintStruct

func PrintStruct(obj any)

func PrintTable

func PrintTable(title string, headers table.Row, rows []table.Row)

func ReadFromFile

func ReadFromFile(path string) ([]byte, error)

func ReadPasswordFromStdin

func ReadPasswordFromStdin(prompt string) (string, error)

func ReadStringFromStdin

func ReadStringFromStdin(prompt string) (string, error)

func ToLocalDate

func ToLocalDate(date string) string

func WaitForAnyKey

func WaitForAnyKey() error

func WriteToFile

func WriteToFile(path string, data []byte) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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