utils

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

* @Author: SpenserCai * @Date: 2023-08-17 00:40:47 * @version: * @LastEditors: SpenserCai * @LastEditTime: 2023-08-26 23:58:29 * @Description: file content

* @Author: SpenserCai * @Date: 2023-08-17 00:30:18 * @version: * @LastEditors: SpenserCai * @LastEditTime: 2023-08-17 00:44:40 * @Description: file content

* @Author: SpenserCai * @Date: 2023-08-17 00:38:37 * @version: * @LastEditors: SpenserCai * @LastEditTime: 2023-08-17 00:40:30 * @Description: file content

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertBase64ToBytes

func ConvertBase64ToBytes(base64Str string) ([]byte, error)

func ConvertBytesToBase64

func ConvertBytesToBase64(data []byte) string

func FormatCommand

func FormatCommand(cmdName string) string

如果name中有_则用下划线分割后每个首字母专大写,如果没有_则直接首字母转大写

func GetImageBase64

func GetImageBase64(url string) (string, error)

func GetImageBytesFromUrl

func GetImageBytesFromUrl(url string) ([]byte, error)

func GetImageReaderByBase64

func GetImageReaderByBase64(b64 string) (*bytes.Reader, error)

func IsJsonString added in v0.2.2

func IsJsonString(str string) bool

判断字符串是否是json字符串

func IsUrl

func IsUrl(str string) bool

func IsZeroValue added in v0.3.0

func IsZeroValue(value interface{}) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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