strings

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendIPList

func AppendIPList(src, dst []string) []string

func ContainList

func ContainList(list []string, toComplete string) (containerList []string)

func EnvFromMap

func EnvFromMap(shell string, envs map[string]string) string

func FormatSize

func FormatSize(size int64) (Size string)

func GetHostV1FromAliasName

func GetHostV1FromAliasName(aliasName string) (name, role, index string)

func GetID

func GetID(name, role string, index int) string

func IPListRemove

func IPListRemove(ss []string, s string) (result []string)

func In

func In(key string, slice []string) bool

In returns if the key is in the slice.

func InList

func InList(key string, slice []string) bool

func IsEmptyLine

func IsEmptyLine(str string) bool

func IsLetterOrNumber

func IsLetterOrNumber(k string) bool

func NotInIPList

func NotInIPList(key string, slice []string) bool

func RandString

func RandString(len int) string

RandString 生成随机字符串

func ReduceIPList

func ReduceIPList(src, dst []string) []string

func RemoveDuplicate

func RemoveDuplicate(list []string) []string

RemoveDuplicate removes duplicate entry in the list.

func RemoveSliceEmpty

func RemoveSliceEmpty(list []string) (fList []string)

func RemoveStrSlice

func RemoveStrSlice(src, dst []string) []string

RemoveStrSlice remove dst element from src slice

func Reverse

func Reverse(s []string) []string

func SliceRemoveStr

func SliceRemoveStr(ss []string, s string) (result []string)

func SortIPList

func SortIPList(iplist []string)

func SplitRemoveEmpty

func SplitRemoveEmpty(s, sep string) []string

func TrimQuotes

func TrimQuotes(s string) string

func TrimSpaceWS

func TrimSpaceWS(str string) string

func TrimWS

func TrimWS(str string) string

func WrapExecResult

func WrapExecResult(host, command string, output []byte, err error) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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