Skip to content

Commit

Permalink
Merge pull request #471 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Version 12.123.1
  • Loading branch information
andyone authored May 7, 2024
2 parents c907182 + 91af94f commit f609165
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Changelog

### 12.123.1

- `[support/network]` Sort and deduplicate IPs

### 12.123.0

- `[csv]` Added method `Reader.Line`
Expand Down
2 changes: 1 addition & 1 deletion ek.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
// ////////////////////////////////////////////////////////////////////////////////// //

// VERSION is current ek package version
const VERSION = "12.123.0"
const VERSION = "12.123.1"

// ////////////////////////////////////////////////////////////////////////////////// //

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/essentialkaos/check v1.4.0
github.com/essentialkaos/depsy v1.3.0
github.com/essentialkaos/go-linenoise/v3 v3.6.0
golang.org/x/crypto v0.22.0
golang.org/x/crypto v0.23.0
golang.org/x/sys v0.20.0
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsK
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
8 changes: 8 additions & 0 deletions support/network/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import (

"github.com/essentialkaos/ek/v12/netutil"
"github.com/essentialkaos/ek/v12/req"
"github.com/essentialkaos/ek/v12/sliceutil"
"github.com/essentialkaos/ek/v12/sortutil"

"github.com/essentialkaos/ek/v12/support"
)
Expand All @@ -29,6 +31,12 @@ func Collect(ipResolverURL ...string) *support.NetworkInfo {
IPv6: cleanIPList(netutil.GetAllIP6()),
}

sortutil.StringsNatural(info.IPv4)
sortutil.StringsNatural(info.IPv6)

info.IPv4 = sliceutil.Deduplicate(info.IPv4)
info.IPv6 = sliceutil.Deduplicate(info.IPv6)

info.Hostname, _ = os.Hostname()

if len(ipResolverURL) != 0 {
Expand Down

0 comments on commit f609165

Please sign in to comment.