util

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssembleDSN

func AssembleDSN(host, port, user, password, database string) string

func CompareSlices

func CompareSlices[T comparable](s1, s2 []T) ([]T, []T)

CompareSlices compare elements in two slices return elements s2 more than s1, s2 less than s1

func IsEmptySlice

func IsEmptySlice[T any](slice []T) bool

func MergeNameWithOwner

func MergeNameWithOwner(owner, name string) string

func NilIfZero

func NilIfZero(t time.Time) *time.Time

func SplitNameWithOwner

func SplitNameWithOwner(s string) (string, string)

SplitNameWithOwner split nameWithOwner string into owner and name string e.g. cloudwego/hertz => cloudwego hertz

func WaitSignal

func WaitSignal(errC chan 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