spruce/internal/templateFuncs/notlastelement.go
Dan Anglin fa8dbe68e9
feat(BREAKING): limit shown employment history
Allow users to limit the amount of employment history shown in the PDF
document by specifying a time range. This is a breaking change as the
structure of the CV needs to slightly change. The employment's start and
end dates need to be represented as integers.

Additional refactoring:

- The CV type is now in the internal cv package.
- The template functions are now in the internal templateFuncs package.
2023-03-02 17:40:04 +00:00

7 lines
176 B
Go

package templates
// NotLastElement returns true if an element of an array
// or a slice is not the last.
func NotLastElement(pos, length int) bool {
return pos < length-1
}