assume

package
v0.0.0-...-6d78eec Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package assume provides assertions that panic on violation.

This serves two purposes:

  1. Failing fast.
  2. Remove unnecessary branches and the temptation to test them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

func Equal[T comparable](x, y T)

Equal panics if the items are not equal.

func NotNil

func NotNil(v interface{})

NotNil panics if the value is nil.

func Success

func Success(err error)

Success panics if the provided error is not nil.

func True

func True(ok bool)

True panics if the condition is false.

Types

This section is empty.

Jump to

Keyboard shortcuts

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