package verify

import "go.etcd.io/etcd/client/pkg/v3/verify"

Index

Functions

func Assert

func Assert(condition bool, msg string, v ...any)

Assert will panic with a given formatted message if the given condition is false.

func DisableVerifications

func DisableVerifications() func()

DisableVerifications unsets `envVerify` and returns a function that can be used to bring the original settings.

func EnableAllVerifications

func EnableAllVerifications() func()

EnableAllVerifications enables verification and returns a function that can be used to bring the original settings.

func EnableVerifications

func EnableVerifications(verification VerificationType) func()

EnableVerifications sets `envVerify` and returns a function that can be used to bring the original settings.

func IsVerificationEnabled

func IsVerificationEnabled(verification VerificationType) bool

func Verify

func Verify(f func())

Verify performs verification if the assertions are enabled. In the default setup running in tests and skipped in the production code.

Types

type VerificationType

type VerificationType string

Source Files

verify.go

Version
v3.6.0 (latest)
Published
May 15, 2025
Platform
linux/amd64
Imports
3 packages
Last checked
1 day ago

Tools for package owners.