util

package
v0.0.0-...-9affa2a Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(a []string, x string) bool

Contains runs a linear search on a string array

func CopyFile

func CopyFile(src, dst string) error

CopyFile copies a file from a source to destination

func CopyFileTo

func CopyFileTo(source, destinationDir string) (err error)

CopyFileTo copies a file from a source to destination directory

func CopyFileToGlob

func CopyFileToGlob(glob, dest string) error

CopyFileToGlob copies files by glob to a destination

func Deref

func Deref[T any](p *T) T

Deref returns the value of a pointer

func MoveFile

func MoveFile(source, destination string) (err error)

MoveFile moves a file from a source to destination

func PrintStructInfo

func PrintStructInfo(label string, instance interface{})

PrintStructInfo prints a configuration struct values

func PrintTable

func PrintTable(header []string, data [][]string)

PrintTable prints a table of data

func Ptr

func Ptr[T any](a T) *T

func RemoveFileGlob

func RemoveFileGlob(glob string) error

RemoveFileGlob removes files by glob

func Sanitize

func Sanitize(input string) *string

Sanitize limits an input string to only uppercase letters and numbers

func StrDeref

func StrDeref(s *string) string

StrDeref returns the value of a pointer to a string

func YAMLUnmarshalStrict

func YAMLUnmarshalStrict(y []byte, v interface{}) error

YAMLUnmarshalStrict unmarshals a YAML file into a struct

Types

This section is empty.

Jump to

Keyboard shortcuts

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