summaryrefslogtreecommitdiff
path: root/src/item.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/item.go')
-rw-r--r--src/item.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/item.go b/src/item.go
index c67ac7ab..955c31d8 100644
--- a/src/item.go
+++ b/src/item.go
@@ -19,6 +19,12 @@ func (item *Item) Index() int32 {
return item.index
}
+var nilItem = Item{index: -1}
+
+func (item *Item) Nil() bool {
+ return item.index < 0
+}
+
func (item *Item) TrimLength() int32 {
if item.trimLength >= 0 {
return item.trimLength