macro

package
v0.0.0-...-e8da0a6 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvtKeyValuePairJson

func ConvtKeyValuePairJson(m map[string]string) string

func ConvtKeyValuePairString

func ConvtKeyValuePairString(m map[string]string) string

func Do

func Do(err *error, fn func() (err error))

func Eqaul

func Eqaul(a error, b ...error) bool

func ErrorCompose

func ErrorCompose(a, b error) error

func ErrorComposef

func ErrorComposef(a, b error, format string, args ...interface{}) error

func ErrorWithHandler

func ErrorWithHandler(err error, handler ...func(err error)) bool

func FromNullInt32

func FromNullInt32(n sql.NullInt32) *int32

func FromNullString

func FromNullString(n sql.NullString) *string

func FromNullTime

func FromNullTime(n sql.NullTime) *time.Time

func HasError

func HasError(err error) bool

func IntervalSqrt

func IntervalSqrt(acc time.Duration, d time.Duration, max time.Duration, n int) time.Duration

func MapContain

func MapContain(m map[string]interface{}, key string) bool

func MapInt

func MapInt(m map[string]interface{}, key string) (int, bool)

func MapMap

func MapMap(m map[string]interface{}, key string) (map[string]interface{}, bool)

func MapString

func MapString(m map[string]interface{}, key string) (string, bool)

func MapValue

func MapValue(m map[string]interface{}, key string) interface{}

func NewNullInt32

func NewNullInt32(p *int32) sql.NullInt32

func NewNullString

func NewNullString(p *string) sql.NullString

func NewNullTime

func NewNullTime(p *time.Time) sql.NullTime

func NewUuid

func NewUuid() uuid.UUID

func NewUuidString

func NewUuidString() string

func Stack

func Stack(err error) string

func TimeParse

func TimeParse(s string) time.Time

func WithDefaultNullString

func WithDefaultNullString(a sql.NullString, b sql.NullString) sql.NullString

Types

type TestChapter

type TestChapter struct {
	Subject string
	Action  func() error
}

type TestScenarios

type TestScenarios []TestChapter

func (TestScenarios) Foreach

func (scenarios TestScenarios) Foreach(fn func(error))

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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