Documentation ¶
Index ¶
- func ArrayContains[R comparable](a []R, v R) bool
- func CloseSilently(ctx context.Context, close func() error)
- func EnsureDirExist(ctx context.Context, dir string) error
- func SanitizePath(ctx context.Context, d, t string) (v string, err error)
- func ToArrayString(a []interface{}) ([]string, bool)
- func ToString(any interface{}) string
- func Unzip(ctx context.Context, inputPath string, outputDir string) error
- func WriteToFile(ctx context.Context, reader io.Reader, path string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArrayContains ¶
func ArrayContains[R comparable](a []R, v R) bool
ArrayContains checks if array a[] contains value v or not
func CloseSilently ¶
CloseSilently closes and write log if an error occurs
func EnsureDirExist ¶
EnsureDirExist creates a directory if it is not existed
func SanitizePath ¶
SanitizePath is to void "G305: Zip Slip vulnerability"
func ToArrayString ¶
ToArrayString converts from array of interface{} to array of string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.