utils

package
v0.7.56 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatTime

func FormatTime(t time.Time, format string) string

Format time to string with "Y"(year), "M"(month), "D"(day), "h"(hour), "m"(minute), "s"(second)

func GetRealIP

func GetRealIP(r *http.Request) string

func GetReplyDepthSize

func GetReplyDepthSize() int

func IsDebug

func IsDebug() bool

func NewLine2BR

func NewLine2BR(source string) string

func PrintJSONf

func PrintJSONf(prefix string, data any)

Print data as JSON string with prefix

func ReplaceLink(str string) string

func Reverse

func Reverse[V any](arr []V) []V

func SprintJSONf

func SprintJSONf(data any, prefix, indent string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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