Categorygithub.com/knaka/go-utils
modulepackage
0.1.3
Repository: https://github.com/knaka/go-utils.git
Documentation: pkg.go.dev

# README

go-utils

Go utils for internal use.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Functions

No description provided by the author
No description provided by the author
Assertf panics with the given message if the condition is false.
No description provided by the author
Bind returns the result of the given function that can fail if err is nil, otherwise the error.
Bind0 is an alias of Then.
Bind1 is an alias of Bind.
No description provided by the author
No description provided by the author
Debugger waits for a debugger to connect if the environment variable $WAIT_DEBUGGER is set or the first argument is "--wait-debugger" goland:noinspection GoUnusedExportedFunction, GoUnnecessarilyExportedIdentifiers.
E returns error.
Elvis returns the first value if it is not empty, otherwise the second value.
ElvisF returns the result of the first function if it is not empty, otherwise the result of the second function.
Err returns a zero value and the given error.
ErrorAs returns the error as the type T if possible, otherwise returns nil.
Expect expects the error to be nil or one of the errors passed as arguments.
Ignore ignores an error explicitly.
Let returns the result of the given function if err is nil.
Let0 calls the given function if err is nil and returns nothing.
Let1 is an alias of Let.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Nil returns a zero value.
Ok returns the given value and nil.
P returns a pointer to a copied value.
PMap returns a pointer to the result of the given function.
PR returns a pointer + error result context.
No description provided by the author
No description provided by the author
R returns a value + error result context.
No description provided by the author
No description provided by the author
Ternary returns the first value if cond is true, otherwise the second value.
TernaryF returns the result of the first function if cond is true, otherwise the result of the second function.
TernaryF2 returns the result of the first function if cond is true, otherwise the result of the second function.
Then calls the given function if err is nil.
No description provided by the author
No description provided by the author
V returns the value.
V0 returns no value.
V2 returns two values.
V3 returns three values.
No description provided by the author

# Variables

No description provided by the author