utils

package
v0.0.0-...-bddae19 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2023 License: Unlicense Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(s []interface{}, str string) bool

Contains helps to check in a slice of string if it contains a particular string with case insensitivity

func GenerateTrackingID

func GenerateTrackingID() string

func GetTestGinContext

func GetTestGinContext() *gin.Context

func JSONError

func JSONError(ctx context.Context, w http.ResponseWriter, err string, code int)

func PaginationValues

func PaginationValues(order *string, first *int, after *int) (string, int, int, error)

func ReturnTracer

func ReturnTracer() trace.Tracer

func SanitizeText

func SanitizeText(stringToReplace string) string

SanitizeText remove \t & \n from strings

func WithTracer

func WithTracer(ctx context.Context, tracer trace.Tracer) context.Context

WithTracer binds tracer to the context

Types

type Tracer

type Tracer trace.Tracer

Jump to

Keyboard shortcuts

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