From 28108920b5e4c6ad916b4c974319b14b3be27798 Mon Sep 17 00:00:00 2001 From: Joe Date: Mon, 8 Jan 2024 20:20:20 +0100 Subject: factor --- c_ldirs.go | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'c_ldirs.go') diff --git a/c_ldirs.go b/c_ldirs.go index aff93e4..af24c28 100644 --- a/c_ldirs.go +++ b/c_ldirs.go @@ -109,15 +109,3 @@ func (ldirs *DirsList) path(node *DirsNode) string { } return path } - -func (ldirs *DirsList) count() (int, int) { - curr := ldirs.head - var count_dirs int - var count_hosts int - - for count_dirs = 0; curr != nil; count_dirs++ { - count_hosts += curr.lhost.count() - curr = curr.next - } - return count_dirs, count_hosts -} -- cgit v1.2.3