diff options
Diffstat (limited to '')
-rw-r--r-- | c_litems.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/c_litems.go b/c_litems.go index 4aa21d6..86841ca 100644 --- a/c_litems.go +++ b/c_litems.go @@ -210,3 +210,12 @@ func (item *ItemsNode) get_next_level() *ItemsNode { } return nil } + +func (litems *ItemsList) reset_id() { + if litems.head != nil { + litems.head.ID = 1 + } + for ptr := litems.head; ptr != nil && ptr.next != nil; ptr = ptr.next { + ptr.next.ID = ptr.ID + 1 + } +} |