mutil

package
v0.4.62 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DateLocation *time.Location
View Source
var DateUtil = dateUtil{
	DateTimeFormat:           "2006-01-02 15:04:05",
	DateTimeNumber:           "20060102150405",
	DateTimeMillNumberFormat: "060102150405",
	TimeFormat:               "15:04:05",
	TimeFormatNumber:         "150405",
	DateFormat:               "2006-01-02",
	DateFormatNumber:         "20060102",
	CurrentLocation:          "Asia/Shanghai",
}
View Source
var EXTENSION = map[string]string{}/* 325 elements not displayed */
View Source
var FileUpload = &upload{}
View Source
var NONE = "application/octet-stream"
View Source
var RandomUtil = &randomUtil{
	LowerCaseAZ: []string{"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"},
	UpCaseAZ:    []string{"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"},
	Number:      []string{"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"},
	All: []string{"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U",
		"V", "W", "X", "Y", "Z"},
}
View Source
var Strings = mstrings{}

Functions

func Assert added in v0.3.0

func Assert(msg string, err error)

func Extension

func Extension(suffix string) string

func IPGet

func IPGet(xForwardedFor string, remoteAddr string) string

func IPInner

func IPInner(ipAddr string) bool

func JSONClone

func JSONClone(input any, output any) error

func JSONTOString

func JSONTOString(data any) (jsonStr string, err error)

func LocalIP added in v0.0.8

func LocalIP() (net.IP, error)

func ReadBuffer

func ReadBuffer(reader io.Reader) (*bytes.Buffer, error)

func SendWebHookDingDing added in v0.0.8

func SendWebHookDingDing(url string, message DingTextMessage)

func Watch added in v0.2.9

func Watch[T any](t T, err error) T

func Watch0 added in v0.3.7

func Watch0[T any](err error)

func Watch2 added in v0.2.9

func Watch2[T any, E any](t T, e E, err error) (T, E)

func Watch3 added in v0.2.9

func Watch3[T any, E any, F any](t T, e E, f F, err error) (T, E, F)

func Watch4 added in v0.2.9

func Watch4[T any, E any, F any, G any](t T, e E, f F, g G, err error) (T, E, F, G)

func Watch5 added in v0.2.9

func Watch5[T any, E any, F any, G any, H any](t T, e E, f F, g G, h H, err error) (T, E, F, G, H)

func Watch6 added in v0.2.9

func Watch6[T any, E any, F any, G any, H any, I any](t T, e E, f F, g G, h H, i I, err error) (T, E, F, G, H, I)

Types

type DingTextMessage added in v0.0.8

type DingTextMessage struct {
	ServerName string
	Method     string
	Url        string
	Message    string
}

Jump to

Keyboard shortcuts

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