utils

package module
v0.0.0-...-84ccb96 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 License: MIT Imports: 1 Imported by: 0

README

go-utils

Util library for Golang projects

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertEmptyStr

func AssertEmptyStr(t *testing.T, val string)

Confirm that a string var is empty

func AssertNil

func AssertNil(t *testing.T, val interface{})

Confirm that a value is nil

func AssertNotEmptyStr

func AssertNotEmptyStr(t *testing.T, val string)

Configm that a string var is not empty

func AssertNotNil

func AssertNotNil(t *testing.T, val interface{})

Confirm that a value is not nil

func Contains

func Contains[T comparable](haystack []T, needle T) bool

Check if a slice contains a specified element

func ContainsAfter

func ContainsAfter[T comparable](haystack []T, needle T, afterIdx int) bool

Check if a slice contains a specified element, only between a certain range

func ContainsWithinRange

func ContainsWithinRange[T comparable](haystack []T, needle T, lowerBound int, upperBound int) bool

Check if a slice contains a specified element, only between a certain range

Types

This section is empty.

Jump to

Keyboard shortcuts

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