Documentation ¶
Index ¶
- func DeleteSlice[T comparable](a []T, k T) []T
- func Exif() (*exiftool.Exiftool, error)
- func GetFile(url string) ([]byte, error)
- func GetFileName(filename string) string
- func GetFileNameExt(filename string) string
- func GetFileNamePrefix(filename string) string
- func GetPhotoSize(photo []byte) (width, hight int, err error)
- func GetType(data []byte) (string, error)
- func In[T comparable](slice []T, fun func(v T) bool) int
- func Md5(data []byte) string
- func Parse2HTML(str string) string
- func PhotoColorInvert(photo []byte) (InvertPhoto []byte, Err error)
- func PrintStackTrace(err interface{}) string
- func RandomString(n int) string
- func Retry(frequency uint, enableRecover bool, Delay time.Duration, ...) error
- func Round(f float64, n int) float64
- func TimeFomate(t time.Duration) string
- func Translate(text string) string
- func TwoDot(value float64) float64
- type Photo
- type RateLimiter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteSlice ¶
func DeleteSlice[T comparable](a []T, k T) []T
func GetFileName ¶
func GetFileNameExt ¶
func GetFileNamePrefix ¶
func GetPhotoSize ¶
func In ¶
func In[T comparable](slice []T, fun func(v T) bool) int
func Parse2HTML ¶ added in v0.2.3
func PhotoColorInvert ¶
func PrintStackTrace ¶
func PrintStackTrace(err interface{}) string
func RandomString ¶
RandomString returns a random string with a fixed length
func TimeFomate ¶
Types ¶
type RateLimiter ¶
type RateLimiter struct {
// contains filtered or unexported fields
}
func NewRateLimiter ¶
func NewRateLimiter(r rate.Limit, b int) *RateLimiter
func (*RateLimiter) AddIP ¶
func (i *RateLimiter) AddIP(ip interface{}) *rate.Limiter
func (*RateLimiter) GetLimiter ¶
func (i *RateLimiter) GetLimiter(ip interface{}) *rate.Limiter
Click to show internal directories.
Click to hide internal directories.