diff options
author | Pablo Mazzini <pmazzini@gmail.com> | 2018-10-15 18:03:30 +0100 |
---|---|---|
committer | insomniac <insomniacslk@users.noreply.github.com> | 2018-10-15 18:03:30 +0100 |
commit | f1e31f7484231a7c51b57dba85abd174f043cc1e (patch) | |
tree | 16202b92256c50f9df255e9e76030dca674d089c /dhcpv4/dhcpv4.go | |
parent | d17d7ed73609154a9c72e1194a4ad4842447dde8 (diff) |
Added String methods for types (#175)
Diffstat (limited to 'dhcpv4/dhcpv4.go')
-rw-r--r-- | dhcpv4/dhcpv4.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/dhcpv4/dhcpv4.go b/dhcpv4/dhcpv4.go index eebc1b0..51621e9 100644 --- a/dhcpv4/dhcpv4.go +++ b/dhcpv4/dhcpv4.go @@ -327,11 +327,7 @@ func (d *DHCPv4) HwType() iana.HwTypeType { // HwTypeToString returns the mnemonic name for the hardware type, e.g. // "Ethernet". If the type is unknown, it returns "Unknown". func (d *DHCPv4) HwTypeToString() string { - hwtype, ok := iana.HwTypeToString[d.hwType] - if !ok { - hwtype = "Invalid" - } - return hwtype + return d.hwType.String() } // SetHwType returns the hardware type as defined by IANA. |