util

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Capitalize

func Capitalize(s string) string

Capitalize capitalizes the first character of the string.

func GoFmt

func GoFmt(buf string) string

GoFmt returns the Go formated string of the input.

Panics if the format fails.

func PrettyPrint

func PrettyPrint(v interface{}) string

PrettyPrint generates a human readable representation of the value v. All values of v are recursively found and pretty printed also.

func SortXML

func SortXML(r io.Reader) string

SortXML sorts the reader's XML elements

func Trim

func Trim(s string) string

Trim removes all leading and trailing white space.

All consecutive spaces will be reduced to a single space.

func WalkDir added in v1.0.13

func WalkDir(dirPth, suffix string) (files []string, err error)

获取指定目录及所有子目录下的所有文件,可以匹配后缀过滤。

Types

This section is empty.

Directories

Path Synopsis
Package utilassert provides testing assertion generation functions.
Package utilassert provides testing assertion generation functions.
Package utilsort provides sorting utility methods.
Package utilsort provides sorting utility methods.

Jump to

Keyboard shortcuts

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