util

package
v0.0.0-...-f0d4a1f Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsForArrayString

func ContainsForArrayString(target string, list []string) bool

func CreateDirIfNotExists

func CreateDirIfNotExists(dirPath string) error

func GenerateFromTemplate

func GenerateFromTemplate(templateName string, data any, funcMap template.FuncMap) string

GenerateFromTemplate 模版生成文本内容

func Get

func Get(requestUrl string, params map[string]string) ([]byte, error)

func Post

func Post(requestUrl string, body string) ([]byte, error)

func ReadExcelData

func ReadExcelData(file string, sheetIndex int) (rs [][]string, err error)

func ReadFile

func ReadFile(filePath string) ([]byte, error)

func ReadFileLines

func ReadFileLines(filePath string) (fileLines []string, err error)

func SplitArray

func SplitArray[T any](array []T, step int) [][]T

func WriteFile

func WriteFile(filePath string, data []byte) error

func WriteFileLines

func WriteFileLines(path string, lines []string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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