lirity

package module
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2021 License: MIT Imports: 8 Imported by: 0

README

lirity

lirity提供一些基础工具库

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes

func Bytes(s string) (b []byte)

Bytes cost-free conversion of characters to byte streams

func Close

func Close(c io.Closer)

Close clear ,use defer

func DirSize

func DirSize(path string) (size int64, count int, err error)

DirSize 统计文件夹的大小

func String

func String(b []byte) (s string)

String cost-free conversion of byte stream to character

func Struct2Map

func Struct2Map(s interface{}) map[string]interface{}

func Struct2MapTag

func Struct2MapTag(s interface{}, tagName string) map[string]interface{}

Types

type FileOrContent

type FileOrContent string

func (FileOrContent) IsPath

func (f FileOrContent) IsPath() bool

IsPath returns true if the FileOrContent is a file path, otherwise returns false.

func (FileOrContent) Read

func (f FileOrContent) Read() ([]byte, error)

func (FileOrContent) String

func (f FileOrContent) String() string

Directories

Path Synopsis
Package client is a generated GoMock package.
Package client is a generated GoMock package.
e
Package e Package e Package e
Package e Package e Package e
v
Package lirity
Package lirity

Jump to

Keyboard shortcuts

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