utils

package
v0.0.0-...-c329c71 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(arr []string, str string) bool

func ConvertProtoToByte

func ConvertProtoToByte(obj protoreflect.ProtoMessage) ([]byte, error)

func GRPCErrorHandler

func GRPCErrorHandler(c *gin.Context, err error)

func ParseStringToTime

func ParseStringToTime(ts string) time.Time

ParseStringToTime converts a string to time.Time. Returns a default time if parsing fails.

func Path

func Path(rel string) string

Path returns the absolute path the given relative file or directory path, relative to the directory in the user's GOPATH. If rel is already absolute, it is returned unmodified.

func SplitByLastPeriod

func SplitByLastPeriod(value string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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