Versions in this module Expand all Collapse all v0 v0.1.0 Sep 4, 2023 Changes in this version + func Convert(dst, src any) (err error) + func Copy(dst, src any) error + func CopyStruct(dst, src interface{}) + func CopyWithOption(dst, src any, opt Option) error + func FileExist(path string) bool + type BaseError struct + Code int + Message string + func (u *BaseError) Error() string + type Model struct + CreatedAt time.Time + DeletedAt gorm.DeletedAt + ID uint + Tenant string + UpdatedAt time.Time + func (m *Model) BeforeCreate(tx *gorm.DB) (err error) + type Option copier.Option + type Optional struct + O *Optional[S] + func Of(s ...S) *Optional[S] + func OfNilable(s ...S) *Optional[S] + func OfNilables(s []S) *Optional[S] + func Ofs(s []S) *Optional[S] + func (o *Optional[S]) ForEach(f func(S)) + func (o *Optional[S]) IfPresent(f func(S)) + func (o *Optional[S]) IsPresent() bool + func (o *Optional[S]) Of(s []S) *Optional[S] + func (o *Optional[S]) OfNilable(s []S) *Optional[S] + type Page struct + Count int + Current int + First bool + Last bool + List []T + Size int + Total int + func IPage(current, size, total int, list []T) *Page[T] + func ToPage(current, size int, data []T) *Page[T] + type PageParam struct + Current int + Size int + type Result struct + Code int + Data any + Message string + func Fail() *Result + func FailMsg(msg string) *Result + func FailMsgCode(msg string, code int) *Result + func FailMsgCodeData(msg string, code int, data any) *Result + func FailMsgData(msg string, data any) *Result + func Ok() *Result + func OkCode(code int) *Result + func OkData(data any) *Result + func OkDataCode(data any, code int) *Result + func OkDataMsg(data any, msg string) *Result + func OkDataMsgCode(data any, msg string, code int) *Result + func OkMsg(msg string) *Result + type Slice []S v0.0.5 Feb 13, 2023 v0.0.4 Feb 6, 2023 v0.0.3 Feb 6, 2023 v0.0.2 Feb 6, 2023 v0.0.1 Jan 19, 2023 Changes in this version + func NanoID(len ...int) (string, error) + func ProjectPath() string + func ReverseString(s string) string + func UUID() string + func UnicodeToString(u string) string