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>
* 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>