util

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2019 License: Apache-2.0 Imports: 1 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes2String

func Bytes2String(b []byte) string

Bytes2String convert bytes to string

func Match

func Match(pattern, name string) (matched bool)

Match - finds whether the text matches/satisfies the pattern string. supports '*' and '?' wildcards in the pattern string. unlike path.Match(), considers a path as a flat name space while matching the pattern. The difference is illustrated in the example here https://play.golang.org/p/Ega9qgD4Qz .

func MatchSimple

func MatchSimple(pattern, name string) bool

MatchSimple - finds whether the text matches/satisfies the pattern string. supports only '*' wildcard in the pattern. considers a file system path as a flat name space.

func String2Bytes

func String2Bytes(s string) []byte

String2Bytes convert string to bytes

func WithRetry

func WithRetry(retry int, job func() error) error

WithRetry retry util job succeeded or retry count limit exceed

Types

This section is empty.

Jump to

Keyboard shortcuts

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