Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Commit

Permalink
added comment for sweet karma
Browse files Browse the repository at this point in the history
  • Loading branch information
schigh committed Mar 7, 2019
1 parent bdce4ef commit f7c167a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/internal/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ func (slice {{.SliceTypeName}}Slice) Each(f func({{if .ByRef}}*{{end}}{{.SourceS
{{end}}`)

// TryEachTmpl is the TryEach function
const TryEachTmpl = SliceTemplate(`// TryEach applies a function to every {{.SourceStruct}} in the slice,
// and returns the index of the element that caused the first error, and the error itself.
// If every member of the slice returns nil, this function will return (-1, nil)
Expand Down Expand Up @@ -95,6 +96,7 @@ func (slice {{.SliceTypeName}}Slice) TryEach(f func({{if .ByRef}}*{{end}}{{.Sour
{{end}}`)

// IfEachTmpl is the IfEach function
const IfEachTmpl = SliceTemplate(`// IfEach applies a function to every {{.SourceStruct}} in the slice,
// and returns the index of the element that caused the function to return false.
// If every member of the slice evaluates to true, this function will return (-1, true)
Expand Down

0 comments on commit f7c167a

Please sign in to comment.