radishutils

package
v0.0.0-...-389ae0d Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CapitalizeFirstLetterUnicode

func CapitalizeFirstLetterUnicode(s string) string

将字符串首字母大写

func ExecAsk

func ExecAsk(p *Params, b *bytes.Buffer, h []Headers) []byte

ExecAsk 执行请求

func PathExists

func PathExists(path string) (bool, error)

PathExists 判断文件或目录是否存在

func Read

func Read(fPath string) [][]string

Read 读取csv文件

func ReadExcel

func ReadExcel(p string) [][]string

ReadExcel 读取excel文件

p: 文件路径

return: 二维数组

Types

type Headers

type Headers struct {
	Key string
	Val string
}

请求头

Key: 请求头key

Val: 请求头value

type Method

type Method string

请求方法

const (
	GET  Method = "GET"
	POST Method = "POST"
	PUT  Method = "PUT"
)

type Params

type Params struct {
	Path   string `url:"path"`
	Method `url:"method"`
	Debug  bool
}

请求参数

Path: 请求路径

Method: 请求方法

Debug: 是否开启调试

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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