util

package
v0.0.0-...-73af561 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2022 License: AGPL-3.0, AGPL-3.0-or-later Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyError

func AnyError(args ...interface{}) error

AnyError messy ...

func ErrorFunc

func ErrorFunc(f func(v interface{}))

func FileExists

func FileExists(file string) bool

func Must

func Must(args ...interface{})

func MustAnyByteSlice

func MustAnyByteSlice(args ...interface{}) []byte

func MustAnyString

func MustAnyString(args ...interface{}) string

func MustBool

func MustBool(args ...interface{}) bool

func MustByteSlice

func MustByteSlice(args ...interface{}) []byte

func MustError

func MustError(args ...interface{}) error

func MustInitFile

func MustInitFile(file string) io.ReadCloser

func MustNotNil

func MustNotNil[T any](args ...interface{}) T

func MustOpenFile

func MustOpenFile(file string) io.WriteCloser

func MustReadFile

func MustReadFile(path string) []byte

func MustString

func MustString(args ...interface{}) string

func MustTrue

func MustTrue(args ...interface{}) bool

func MustVal

func MustVal[T any](rule func(T) bool, args ...interface{}) T

func Optional

func Optional(args ...interface{}) bool

func PanicFunc

func PanicFunc(f func(v interface{}))

func ReadFile

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

func UrlGet

func UrlGet(url string) (io.ReadCloser, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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