assert

package
v0.0.0-...-110224e Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package assert provides convenience functions that help a method or constructor check whether it was invoked correctly (whether its preconditions have been met).

When the assertion fails, a panic occurs, allowing bugs to be found in a fail-fast manner.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(element string, arr []string)

Contains asserts that element is a member of arr.

func DirectoryExists

func DirectoryExists(dir string)

DirectoryExists asserts that a directory is on the current filesystem.

func GreaterThanOrEqualTo

func GreaterThanOrEqualTo(value int, limit int)

GreaterThanOrEqualTo asserts that value is greater than or equal to limit.

func NotEmpty

func NotEmpty(obj interface{})

NotEmpty asserts that obj is non-null and does not have a zero value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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