util

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(args ...int) int

func CamelToSnake

func CamelToSnake(s string) string

func Concat

func Concat(args ...string) string

func GetStatusCodeFromComment

func GetStatusCodeFromComment(comment string) (int32, error)

func IsFileExist

func IsFileExist(name string) bool

func MatchString

func MatchString(b []byte, expr string) bool

func OpenFile

func OpenFile(fPath string) (*os.File, error)

func SnakeToCamel

func SnakeToCamel(s string) string

func ToInt

func ToInt(v interface{}) int

func ToLowerFirst

func ToLowerFirst(s string) string

func ToUpperFirst

func ToUpperFirst(s string) string

Types

type SvcAssign

type SvcAssign struct {
	DbDSN           string
	SvcName         string
	SvcGroup        string
	PortInterval    int
	ErrcodeInterval int
	PortInitMap     map[string]interface{}
	ErrcodeInitMap  map[string]interface{}
	// contains filtered or unexported fields
}

func NewSvcAssign

func NewSvcAssign(
	dbDSN, svcName, svcGroup string,
	portInterval, errcodeInterval int,
	portInitMap, errcodeInitMap map[string]interface{},
) *SvcAssign

func (*SvcAssign) GetOrAssignPortAndErrcode

func (a *SvcAssign) GetOrAssignPortAndErrcode(port, errCode *int) error

Jump to

Keyboard shortcuts

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