Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Equal ¶
Equal asserts that two values are equal. If they are not equal, it prints an error message and exits the program with status 1.
Example:
enforce.Equal(got, want, "database connection failed")
func NoError ¶
NoError asserts that an error is nil. If the error is not nil, it prints the error and exits the program with status 1.
Example:
enforce.NoError(db.Connect(), "failed to connect to database")
func NotEqual ¶
NotEqual asserts that two values are not equal. If they are equal, it prints an error message and exits the program with status 1.
Example:
enforce.NotEqual(password, "", "password cannot be empty")
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.