From b7466bd85d07216881c7f974f13c693e8b46702d Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Wed, 11 Jan 2012 08:51:43 +0100 Subject: [PATCH] Remove this function again --- labels.go | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/labels.go b/labels.go index 77de8e39..97d97c41 100644 --- a/labels.go +++ b/labels.go @@ -24,7 +24,7 @@ func SplitLabels(s string) []string { // CompareLabels compares the strings s1 and s2 and // returns how many labels they have in common starting from the right. -// The comparison stops at the first inequality +// The comparison stops at the first inequality. // // www.miek.nl and miek.nl have two labels in common: miek and nl // www.miek.nl and www.bla.nl have one label in common: nl @@ -48,19 +48,3 @@ func CompareLabels(s1, s2 string) (n int) { } return } - -// This function is needed for easy handling of compression -// pointers -// www.miek.nl, 2, gives that start of miek.nl (which is -// 2 labels from the right) -// labeloffset of zero is fishy as is a labeloffset larger -// than the number of labels... TODO: make it an error? -func offsetLabelFromRight(s string, labeloffset int) int { - l := SplitLabels(s) - fromleft := len(l) - labeloffset - off := 0 - for i := 0; i < fromleft; i++ { - off += len(l[i]) + 1 - } - return off -}