util

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const AppVersion = "v0.4.0"

Variables

This section is empty.

Functions

func Assert

func Assert(cond bool, errMsg string)

func CopyFileToZip

func CopyFileToZip(w *zip.Writer, dst string, src string) error

func CreateTemplate

func CreateTemplate(name string, t string) *template.Template

func CreateWorkDir

func CreateWorkDir(path *string, clean bool) (bool, error)

func IsReadableFile

func IsReadableFile(path string) (string, error)

func IsWritableFile

func IsWritableFile(path string) (string, error)

func Must

func Must(err error) func(doing string)

func Must1

func Must1[T any](obj T, err error) func(doing string) T

func Must2

func Must2[T1 any, T2 any](obj1 T1, obj2 T2, err error) func(doing string) (T1, T2)

func NameWithoutExt

func NameWithoutExt(filename string) string

func ReplaceExt

func ReplaceExt(path string, ext string) string

func WriteFileToZip

func WriteFileToZip(w *zip.Writer, path string, tm *template.Template, data any) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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