mirror of
https://github.com/juanfont/headscale.git
synced 2025-11-20 01:40:21 -05:00
Add and fix stylecheck (golint replacement)
This commit is contained in:
4
utils.go
4
utils.go
@@ -197,7 +197,7 @@ func ipPrefixToString(prefixes []netaddr.IPPrefix) []string {
|
||||
return result
|
||||
}
|
||||
|
||||
func stringToIpPrefix(prefixes []string) ([]netaddr.IPPrefix, error) {
|
||||
func stringToIPPrefix(prefixes []string) ([]netaddr.IPPrefix, error) {
|
||||
result := make([]netaddr.IPPrefix, len(prefixes))
|
||||
|
||||
for index, prefixStr := range prefixes {
|
||||
@@ -212,7 +212,7 @@ func stringToIpPrefix(prefixes []string) ([]netaddr.IPPrefix, error) {
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func containsIpPrefix(prefixes []netaddr.IPPrefix, prefix netaddr.IPPrefix) bool {
|
||||
func containsIPPrefix(prefixes []netaddr.IPPrefix, prefix netaddr.IPPrefix) bool {
|
||||
for _, p := range prefixes {
|
||||
if prefix == p {
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user