From 5461cb587315d93b3e9ba193d594df681e05b220 Mon Sep 17 00:00:00 2001 From: Hu Jun Date: Thu, 18 Jun 2020 11:02:42 -0700 Subject: fix some lint complains in example_lease_test.go Signed-off-by: Hu Jun --- dhcpv4/nclient4/example_lease_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dhcpv4/nclient4/example_lease_test.go b/dhcpv4/nclient4/example_lease_test.go index 1d7d7a4..876a075 100644 --- a/dhcpv4/nclient4/example_lease_test.go +++ b/dhcpv4/nclient4/example_lease_test.go @@ -12,18 +12,18 @@ import ( func Example_dHCPv4ClientLease() { ifname := "eth0" - remote_id := "client-1" + remoteID := "client-1" var idoptlist dhcpv4.OptionCodeList //specify option82 is part of client identification used by DHCPv4 server idoptlist.Add(dhcpv4.OptionRelayAgentInformation) - clnt_options := []nclient4.ClientOpt{nclient4.WithClientIDOptions(idoptlist), nclient4.WithDebugLogger()} - clnt, err := nclient4.New(ifname, clnt_options...) + clntOptions := []nclient4.ClientOpt{nclient4.WithClientIDOptions(idoptlist), nclient4.WithDebugLogger()} + clnt, err := nclient4.New(ifname, clntOptions...) if err != nil { log.Fatalf("failed to create dhcpv4 client,%v", err) } //adding option82/remote-id option to discovery and request - remote_id_sub_opt := dhcpv4.OptGeneric(dhcpv4.AgentRemoteIDSubOption, []byte(remote_id)) - option82 := dhcpv4.OptRelayAgentInfo(remote_id_sub_opt) + remoteIDSubOpt := dhcpv4.OptGeneric(dhcpv4.AgentRemoteIDSubOption, []byte(remoteID)) + option82 := dhcpv4.OptRelayAgentInfo(remoteIDSubOpt) _, _, err = clnt.RequestSavingLease(context.Background(), dhcpv4.WithOption(option82)) if err != nil { log.Fatal(err) -- cgit v1.2.3