Documentation ¶
Index ¶
- func BoolMaybeDeNil(s *bool) bool
- func Exists(path string) (bool, error)
- func FuncName(skip int) string
- func Int32to64(i *int32) *int64
- func IntMaybeDefault(s *int, def int) int
- func JsonStr(r interface{}) string
- func Jsonify(r interface{}) json.RawMessage
- func ListSubFolders(path string) ([]string, error)
- func Max(x, y int) int
- func MaybeAssignStr(s **string, defStr string)
- func MaybeCreate(folder string) error
- func MaybeDefault[T any](s *T, v T) T
- func MaybeNil[T any](s *T) (res T)
- func Min(x, y int) int
- func NewString(v string) *string
- func Ptr[T any](v T) *T
- func StrMaybeDefault(s *string, defStr string) string
- func StrMaybeNil(s *string) string
- func SumSlice(s []int) int
- type Result
- func ErrResult(err error) *Result
- func Error(ctx string, err error) *Result
- func Errorf(format string, a ...interface{}) *Result
- func GetAPIUrl(baseUrl, endpoint string) (string, *Result)
- func GetUrl(baseUrl, endpoint string) (string, *Result)
- func ListFiles(folder string) ([]string, *Result)
- func MsgError(ctx string, msg string) *Result
- func NewErrResult(ctx string, r interface{}) *Result
- func NewResult(ctx string, r interface{}) *Result
- func OK(ctx string) *Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoolMaybeDeNil ¶
func IntMaybeDefault ¶
func Jsonify ¶
func Jsonify(r interface{}) json.RawMessage
func ListSubFolders ¶
func MaybeAssignStr ¶
func MaybeCreate ¶
func MaybeDefault ¶
func MaybeDefault[T any](s *T, v T) T
func StrMaybeDefault ¶
func StrMaybeNil ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.