From 354237b996ddc5a213f5bcf759079e199f0353db Mon Sep 17 00:00:00 2001 From: Pieter Joost van de Sande Date: Thu, 29 Apr 2021 20:08:13 +0200 Subject: [PATCH] Improve documentation for FirstWith Document the result value when nothing is found. --- result.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/result.go b/result.go index 588cbd5..6ec35ec 100644 --- a/result.go +++ b/result.go @@ -190,7 +190,7 @@ func (q Query) First() interface{} { } // FirstWith returns the first element of a collection that satisfies a -// specified condition. +// specified condition if found, otherwise nil. func (q Query) FirstWith(predicate func(interface{}) bool) interface{} { next := q.Iterate()