You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: 725. Split Linked List in Parts.go
    path of file: ./repos/LeetCode-Go/leetcode/0725.Split-Linked-List-in-Parts
    
    the code of the file until where you have to start completion: package leetcode

import (
	"fmt"

	"github.com/halfrost/LeetCode-Go/struc
    
func getLength(l *ListNode) int {
	count := 0
	cur := l
	for cur != nil {
		count++
		cur = cur.Next
	}
	return count
}