componets

package
v0.0.0-...-9082aa5 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenRandStrings

func GenRandStrings(max int) string

GenRandStrings 生成随机字符串

func GetAvailableAddr

func GetAvailableAddr() (ip string, port int)

GetAvailableAddr 获取可访问ip+port

func GetFreePort

func GetFreePort() (int, error)

func GetIntArrayMax

func GetIntArrayMax(arr []int) (m int)

func GetLocalIp

func GetLocalIp() net.IP

Types

type Response

type Response struct {
	// contains filtered or unexported fields
}

func NewResponse

func NewResponse() (r *Response)

func (*Response) Append

func (r *Response) Append(key string, value interface{}) *Response

func (*Response) Code

func (r *Response) Code(code int) *Response

func (*Response) Error

func (r *Response) Error(msg string) *Response

func (*Response) JSON

func (r *Response) JSON(c *gin.Context)

func (*Response) Message

func (r *Response) Message(msg string) *Response

Jump to

Keyboard shortcuts

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