utils

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExitWithError

func ExitWithError(err error)

func FilenameWithGen

func FilenameWithGen(filename string) string

func FromJson

func FromJson[T any](jsons []string) ([]T, error)

func GetProjectPackageName

func GetProjectPackageName(dir string) (string, error)

func Keys

func Keys[K comparable, V any](m map[K]V) []K

func NewMockSqlx

func NewMockSqlx() (*sqlx.DB, sqlmock.Sqlmock, error)

func PointerTo

func PointerTo[T any](value T) *T

func SplitFilename

func SplitFilename(filename string) (string, string)

func Values

func Values[K comparable, V any](m map[K]V) []V

Types

type Entry

type Entry[K comparable, V any] struct {
	Key   K
	Value V
}

func Entries

func Entries[K comparable, V any](m map[K]V) []Entry[K, V]

type ValidateEntityName

type ValidateEntityName func(entityName string) bool

func CreateValidateEntityNames

func CreateValidateEntityNames(
	inclusions []string,
	exclusions []string,
) (ValidateEntityName, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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