From 7319b8f8a1a601b5e69c5bcaa33914c0f85b92e6 Mon Sep 17 00:00:00 2001 From: Sean Karlage Date: Sun, 29 Jul 2018 17:54:30 -0700 Subject: DHCPv6: Rename Option constants to CamelCase To appease linters --- dhcpv6/utils.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'dhcpv6/utils.go') diff --git a/dhcpv6/utils.go b/dhcpv6/utils.go index b1c0b93..1681661 100644 --- a/dhcpv6/utils.go +++ b/dhcpv6/utils.go @@ -11,14 +11,14 @@ import ( // if the "boot file" option is included in the packet, which is useful for // ADVERTISE/REPLY packet. func IsNetboot(msg DHCPv6) bool { - for _, optoro := range msg.GetOption(OPTION_ORO) { + for _, optoro := range msg.GetOption(OptionORO) { for _, o := range optoro.(*OptRequestedOption).RequestedOptions() { - if o == OPT_BOOTFILE_URL { + if o == OptionBootfileURL { return true } } } - if optbf := msg.GetOneOption(OPT_BOOTFILE_URL); optbf != nil { + if optbf := msg.GetOneOption(OptionBootfileURL); optbf != nil { return true } return false @@ -42,14 +42,14 @@ func IsUsingUEFI(msg DHCPv6) bool { // 7 EFI BC // 8 EFI Xscale // 9 EFI x86-64 - if opt := msg.GetOneOption(OPTION_CLIENT_ARCH_TYPE); opt != nil { + if opt := msg.GetOneOption(OptionClientArchType); opt != nil { optat := opt.(*OptClientArchType) // TODO investigate if other types are appropriate if optat.ArchType == EFI_BC || optat.ArchType == EFI_X86_64 { return true } } - if opt := msg.GetOneOption(OPTION_USER_CLASS); opt != nil { + if opt := msg.GetOneOption(OptionUserClass); opt != nil { optuc := opt.(*OptUserClass) for _, uc := range optuc.UserClasses { if strings.Contains(string(uc), "EFI") { -- cgit v1.2.3