func UniquePortRanges(portRanges []PortRange) []PortRange {
	var (
		res       []PortRange
		processed = make(map[PortRange]struct{})
	)

	for _, pr := range portRanges {
		if _, seen := processed[pr]; seen {
			continue
		}

		res = append(res, pr)
		processed[pr] = struct{}{}
	}
	return res
}
// UniquePortRanges removes any duplicate port ranges from the input and
// returns de-dupped list back.
UniquePortRanges removes any duplicate port ranges from the input and
returns de-dupped list back.
// UniquePortRanges removes any duplicate port ranges from the input and // returns de - dupped list back .
func UniquePortRanges(portRanges []PortRange) []PortRange {
	var (
		res       []PortRange
		processed = make(map[PortRange]struct{})
	)
	for _, pr := range portRanges {
		if _, seen := processed[pr]; seen {
			continue
		}
		res = append(res, pr)
		processed[pr] = struct{}{}
	}
	return res
}
func UniquePortRanges ( portRanges [ ] PortRange ) [ ] PortRange { var ( res [ ] PortRange processed = make ( map [ PortRange ] struct { } ) ) for _ , pr := range portRanges { if _ , seen := processed [ pr ] ; seen { continue } res = append ( res , pr ) processed [ pr ] = struct { } { } } return res }
UniquePortRanges removes any duplicate port ranges from the input and
returns de-dupped list back.
UniquePortRanges removes any duplicate port ranges from the input and returns de - dupped list back .