Documentation
¶
Overview ¶
Package lof provides utility functions for functional programming.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IfNotEmpty ¶ added in v0.12.0
IfNotEmpty returns s and whether s is non-empty. Converts "empty string = absent" returns to Go's comma-ok idiom.
result := cmp.Diff(want, got)
if diff, ok := lof.IfNotEmpty(result); ok {
t.Errorf("mismatch:\n%s", diff)
}
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.