utils

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddSensitive added in v1.0.0

func AddSensitive(ctx context.Context, key string, value any) context.Context

func Atoi

func Atoi(s string) int

Atoi MUST only be called on trusted input as it won't return an error nor panic after calling `strconv.Atoi`.

func Ptr

func Ptr[T any](t T) *T

func ToInt

func ToInt(itf types.Int64) *int

return a nil point if types.Int64 is null, else its value

func ToIntOnDynamic added in v1.0.1

func ToIntOnDynamic(itf types.Int64, challType types.String) *int

ToIntOnDynamic returns the value of itf as an integer pointer iif the challType is dynamic.

func ToTFInt64

func ToTFInt64(i *int) types.Int64

return a null types.Int64 if pointer is nil, else its value

func ToTFString

func ToTFString(str *string) types.String

Types

This section is empty.

Jump to

Keyboard shortcuts

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