Documentation
¶
Index ¶
- Constants
- Variables
- func ConvTimestampMilli(dateTime string) int64
- func ConvToMap(value any) map[string]any
- func Delete(slice []string, index int) (newSlice []string)
- func Desensitize(input string, keep ...int) string
- func ExcelExport(sheetName string, titleCols []string, colFieldMap map[string]string, ...) error
- func FormatDateTime(timestamp int64) string
- func FormatDateTimeMonth(timestamp int64) string
- func GenerateId() string
- func GetLocalIp() string
- func GetTemplateVariables(title, content string) []string
- func NewKey(prefix string, length int, ids ...string) string
- func RenderTemplate(title, content string, data map[string]any) (string, string, error)
- func Round(f float64, n int) float64
- func ToMap[T any, K int | string](arr []T, fn func(T) K) map[K]T
- func Unique[T IntInterface | string](data []T) []T
- type DateTime
- type IntInterface
Constants ¶
View Source
const ( DATE_TIME_FORMAT = "2006-01-02 15:04:05" DATE_TIME_MONTH_FORMAT = "01-02 15:04:05" DATE_MINUTE_FORMAT = "2006-01-02 15:04" DATE_FORMAT = "2006-01-02" )
View Source
const COL_A = 65
Variables ¶
View Source
var Location *time.Location
Functions ¶
func ConvTimestampMilli ¶
func ExcelExport ¶
func FormatDateTime ¶
func FormatDateTimeMonth ¶
func GenerateId ¶
func GenerateId() string
func GetLocalIp ¶
func GetLocalIp() string
func GetTemplateVariables ¶
func RenderTemplate ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.