diff options
author | Hu Jun <hujun.work@gmail.com> | 2020-06-18 11:02:42 -0700 |
---|---|---|
committer | Hu Jun <hujun.work@gmail.com> | 2020-06-18 11:02:42 -0700 |
commit | 5461cb587315d93b3e9ba193d594df681e05b220 (patch) | |
tree | e9fa504760947e0cef41479e76022a56b464cbe6 /dhcpv4 | |
parent | eb6bb0498f94a5d396a03d9ec5b028703071e2d7 (diff) |
fix some lint complains in example_lease_test.go
Signed-off-by: Hu Jun <hujun.work@gmail.com>
Diffstat (limited to 'dhcpv4')
-rw-r--r-- | dhcpv4/nclient4/example_lease_test.go | 10 |
1 files 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) |