github.com/ethersphere/bee/v2@v2.2.0/pkg/bzz/utilities.go (about) 1 // Copyright 2022 The Swarm Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package bzz 6 7 // ContainsAddress reports whether a is present in addrs. 8 func ContainsAddress(addrs []Address, a *Address) bool { 9 for _, v := range addrs { 10 if v.Equal(a) { 11 return true 12 } 13 } 14 return false 15 }