utils

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

This package describes the private utility and generic functions to the other methods of the main gooroo package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyStr added in v0.0.6

func AnyStr(v any) string

Convert 'any' type to 'string'.

func CallerToKey

func CallerToKey(file string, no int) string

Formatting a string for key management

func Contains

func Contains(s []string, str string) bool

Check for the presence of a 'string' in a '[]string'.

func MapInit

func MapInit[T any](key string, _map map[string]T, value T)

Initializes a value in a map if and only if it does not exist.

func MapInitCallback

func MapInitCallback[T any](key string, _map map[string]T, callback func() T)

Initializes a function (value) in a map if and only if it does not exist.

Types

This section is empty.

Jump to

Keyboard shortcuts

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