commonUtils

package
v0.0.0-...-a97389e Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddSlashForUrl

func AddSlashForUrl(url string) string

func Base

func Base(pathStr string) string

func GetDebugParamForRun

func GetDebugParamForRun(args []string) (debug string, ret []string)

func GetIp

func GetIp() (ip net.IP, mac net.HardwareAddr)

func GetOs

func GetOs() commConsts.OsType

func GetUserHome

func GetUserHome() string

func GetValidPort

func GetValidPort(start int, end int, existPortMap *map[int]bool) (ret int)

func IgnoreCodeFile

func IgnoreCodeFile(path string) bool

func IgnoreZtfFile

func IgnoreZtfFile(path string) bool

func IntToStrArr

func IntToStrArr(intArr []int) (strArr []string)

func IsDisable

func IsDisable(enable string) bool

func IsPortInUse

func IsPortInUse(port int) bool

func IsRelease

func IsRelease() bool

func LinkedMapToMap

func LinkedMapToMap(mp maps.Map) map[string]string

func NewSliceValue

func NewSliceValue(vals []string, p *[]string) *sliceValue

func RemoveBlankLine

func RemoveBlankLine(str string) string

func UintToStrArr

func UintToStrArr(intArr []uint) (strArr []string)

Types

type RWMap

type RWMap struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewRWMap

func NewRWMap(n int) *RWMap

func (*RWMap) Delete

func (m *RWMap) Delete(k int)

func (*RWMap) Each

func (m *RWMap) Each(f func(k, v int) bool)

func (*RWMap) Get

func (m *RWMap) Get(k int) (int, bool)

func (*RWMap) Len

func (m *RWMap) Len() int

func (*RWMap) Set

func (m *RWMap) Set(k int, v int)

Jump to

Keyboard shortcuts

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