From d167bd9fde024b9fdd38faba9d472da1575800a8 Mon Sep 17 00:00:00 2001
From: kaiyou <dev@kaiyou.fr>
Date: Sun, 30 Oct 2022 13:22:46 +0100
Subject: [PATCH] Remove dead address slice code

---
 pkg/types/net.go | 41 -----------------------------------------
 1 file changed, 41 deletions(-)

diff --git a/pkg/types/net.go b/pkg/types/net.go
index 9dd48b3..b4921ba 100644
--- a/pkg/types/net.go
+++ b/pkg/types/net.go
@@ -13,10 +13,6 @@ import (
 // All hepto addresses are IPv6
 type Address net.IPNet
 
-// Address set are not strictly required and could theoritically
-// be replace with IPSlice, they are however kept for consistency
-type AddressSlice []Address
-
 func (n *Address) Type() string {
 	return "IPv6"
 }
@@ -94,40 +90,3 @@ func ULA(name string, length int, id uint16) Address {
 		Mask: net.CIDRMask(length, 128),
 	}
 }
-
-func (n AddressSlice) Slice() []Address {
-	return ([]Address)(n)
-}
-
-func (n AddressSlice) IPSlice() []net.IP {
-	res := make([]net.IP, len(n))
-	for i, address := range n.Slice() {
-		res[i] = address.IP
-	}
-	return res
-}
-
-func (n *AddressSlice) Type() string {
-	return "[]IPv6"
-}
-
-func (n AddressSlice) String() string {
-	addresses := make([]string, len((n.Slice())))
-	for i, address := range n {
-		addresses[i] = address.String()
-	}
-	return strings.Join(addresses, ",")
-}
-
-func (n *AddressSlice) Set(s string) error {
-	for _, item := range strings.Split(s, ",") {
-		item = strings.TrimSpace(item)
-		var address Address
-		err := address.Set(s)
-		if err != nil {
-			return err
-		}
-		*n = append(*n, address)
-	}
-	return nil
-}
-- 
GitLab