10 Commits

Author SHA1 Message Date
Ben Kochie
8026e5db33
Fix Go mod path (#226)
In order to update to v2.0.0, we need to update the module path per the
Go module documentation.
* https://go.dev/doc/modules/major-version

Fixes: https://github.com/jsimonetti/rtnetlink/issues/225

This can be released as v2.0.1

Signed-off-by: SuperQ <superq@gmail.com>
2024-05-10 16:40:56 +02:00
Ben Kochie
889c07bf6d
Enable golangci-lint (#202)
Add a GitHub actions workflow to run golanci-lint.
* Only uses latest Go version to avoid `gofmt` differences.
* Fixup linting issues.
* Ignore misspell `Prefered` as it is used as a public struct variable.
* Disable `unused-parameter` as it produces unecessary warning noise.

Signed-off-by: SuperQ <superq@gmail.com>
2023-11-27 13:42:29 +01:00
Matt Layher
af39de65d6
rtnetlink: make AddressMessage.Attributes optional via pointer (#124)
Signed-off-by: Matt Layher <mdlayher@gmail.com>
2021-07-14 15:52:44 +02:00
Julian Kornberger
bde56ed163
Cleanup (#94)
* Clean up code and remove code duplication
* Apply gofmt

Signed-off-by: Julian Kornberger <jk+github@digineo.de>
2020-12-16 14:43:43 +01:00
Jeroen Simonetti
3b195764a9
Fix rtnl for macos (#71)
Signed-off-by: Jeroen Simonetti <jeroen@simonetti.nl>
2020-01-17 13:13:10 +01:00
Timo Beckers
228b24473a rtnl - set 'host' scope when adding loopback addresses (#66)
Signed-off-by: Timo Beckers <timo@incline.eu>
2019-12-03 19:33:23 +01:00
Timo Beckers
5d027701a5 rtnl.(Must)ParseAddr and documentation fixes (#65)
* rtnl: add ParseAddr and MustParseAddr helpers, add usage examples

Signed-off-by: Timo Beckers <timo@incline.eu>

* addr_*_test - test ParseAddr and MustParseAddr

Signed-off-by: Timo Beckers <timo@incline.eu>

* Examples: use first ParseCIDR return value as IP address

Signed-off-by: Timo Beckers <timo@incline.eu>
2019-12-03 01:13:55 +01:00
Yaroslav Kolomiiets
f505b733d0 rtnl: AddrAdd: ensure v4 address format is used for AF_INET
Signed-off-by: Yaroslav Kolomiiets <yarikos@gmail.com>
2019-05-01 13:07:41 +01:00
Yaroslav Kolomiiets
cc931d0061 rtnl: fix bad IPMask returned in Addrs()
Signed-off-by: Yaroslav Kolomiiets <yarikos@gmail.com>
2019-05-01 13:07:31 +01:00
Yaroslav Kolomiiets
ac4930ec47 add rtnl, the new high-level wrapper package
Signed-off-by: Yaroslav Kolomiiets <yarikos@gmail.com>
2019-04-26 15:44:14 +01:00