Documentation
¶
Index ¶
- Constants
- func AddExtraSpaceIfExist(str string) string
- func CheckFileIsExist(filename string) bool
- func DeleteExtraSpace(s string) string
- func GRPCErrIsUnknownWrapper(err error) error
- func GenerateSnowFlakeID(nodenumber int64) int64
- func GetCurrentTime() time.Time
- func GetCurrentTimeString(timeType string) string
- func GetCurrentTimeUnix() int64
- func GetFreePort() (int, error)
- func GetServiceID(projectName string, projectVersion string, ServiceIP string, ServicePort int) string
- func GetServiceName(projectName string) string
- func GetTypeName(myvar interface{}, isToLowerCase bool) string
- func Getparentdirectory(path string, level int) string
- func HTTPErrDecoder(err error) (bool, map[string]string)
- func HTTPErrEncoder(err error) error
- func RecordErrorLevelTwo() (uintptr, string, int)
- func SliceInSlice(sliceToCheck []string, slice []string) bool
- func StringInSlice(value string, stringSlice []string) bool
Constants ¶
const RFC3339FullDate = "2006-01-02"
RFC3339FullDate for rfc full date
Variables ¶
This section is empty.
Functions ¶
func AddExtraSpaceIfExist ¶
AddExtraSpaceIfExist adds a separator
func CheckFileIsExist ¶
CheckFileIsExist : check file if exist ,exist -> true , not exist -> false , *
- @param filename string ,the file name need to check
- @return boolean string
func GRPCErrIsUnknownWrapper ¶
GRPCErrIsUnknownWrapper unknown err wrapper only will wrapper the error which is not be encoded P.S :this wrapper is used in grpc
func GenerateSnowFlakeID ¶
GenerateSnowFlakeID generate snowflake id
func GetCurrentTimeString ¶
GetCurrentTimeString get current time with string
func GetCurrentTimeUnix ¶
func GetCurrentTimeUnix() int64
GetCurrentTimeUnix get current time with unix time
func GetServiceID ¶
func GetServiceID(projectName string, projectVersion string, ServiceIP string, ServicePort int) string
GetServiceID get service name which will register to service mesh
func GetServiceName ¶
GetServiceName get service name which will register to service mesh
func GetTypeName ¶
GetTypeName to get struct type name
func Getparentdirectory ¶
Getparentdirectory : get parent directory of the path ,
- @param path string ,the path you want to get parent directory
- @return string , the parent directory you need
func HTTPErrDecoder ¶
HTTPErrDecoder decode
func HTTPErrEncoder ¶
HTTPErrEncoder encode http err only will wrapper the error which is not be encoded P.S :this wrapper is used in grpc
func RecordErrorLevelTwo ¶
RecordErrorLevelTwo login error and print line , func , and error to gin context
func SliceInSlice ¶
SliceInSlice if slice in slice
func StringInSlice ¶
StringInSlice if value in stringlist
Types ¶
This section is empty.