summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDennis Marttinen <twelho@welho.tech>2022-07-18 16:13:45 +0300
committerDennis Marttinen <twelho@welho.tech>2022-10-01 15:15:56 +0300
commit4b60c8bb3e481810b4a52e883a3a70b776c6165d (patch)
treed07cef853005636e301201b8af5a2acac46215c3
parent043f1726f02e2908b959423a0b95a9affdc08b73 (diff)
dhcpv4: make NewInform() formatting consistent with neighbors
This is just a minor readability improvement that makes `NewInform()` consistent with the neighboring functions like `NewRequest()`, `NewReply()`, `NewRelease()` etc. Having the prepended modifiers on the same line helps with separating the modifiers that provided by the function from the modifiers passed in by the consumer of the function. Signed-off-by: Dennis Marttinen <twelho@welho.tech>
-rw-r--r--dhcpv4/dhcpv4.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/dhcpv4/dhcpv4.go b/dhcpv4/dhcpv4.go
index e2fd190..89c7184 100644
--- a/dhcpv4/dhcpv4.go
+++ b/dhcpv4/dhcpv4.go
@@ -222,8 +222,7 @@ func PrependModifiers(m []Modifier, other ...Modifier) []Modifier {
// NewInform builds a new DHCPv4 Informational message with the specified
// hardware address.
func NewInform(hwaddr net.HardwareAddr, localIP net.IP, modifiers ...Modifier) (*DHCPv4, error) {
- return New(PrependModifiers(
- modifiers,
+ return New(PrependModifiers(modifiers,
WithHwAddr(hwaddr),
WithMessageType(MessageTypeInform),
WithClientIP(localIP),