Added convenience function.

This commit is contained in:
Benjamin A. Shelton 2026-10-13 09:18:59 -06:00
commit 6ce1662497
Signed by: zancarius
GPG key ID: 8BD42DBD6C337E01

View file

@ -1,5 +1,7 @@
package bible
import "strings"
var singleChapters = map[string]struct{}{
"oba": {},
"2jn": {},
@ -7,3 +9,11 @@ var singleChapters = map[string]struct{}{
"phm": {},
"jud": {},
}
func HasSingleChapter(book string) bool {
book = strings.ToLower(book)
if _, ok := singleChapters[book]; ok {
return true
}
return false
}