Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-829 fixed typos and golint warns #947

Merged
merged 1 commit into from
Jan 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/loxinet/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ type CIStateH struct {
initRules6 bool
}

func (ci *CIStateH) BFDSessionNotify(instance string, remote string, ciState string) {
func (ci *CIStateH) BFDSessionNotify(instance string, _ string, ciState string) {
var sm cmn.HASMod

sm.Instance = instance
Expand Down
2 changes: 1 addition & 1 deletion pkg/loxinet/layer2.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ func (l2 *L2H) FdbsTicker() {
}

// PortNotifier - Implementation of PortEventIntf interface
func (l2 *L2H) PortNotifier(name string, osID int, evType PortEvent) {
func (l2 *L2H) PortNotifier(name string, _ int, evType PortEvent) {
if evType&PortEvDown|PortEvDelete|PortEvLowerDown != 0 {
for _, f := range l2.FdbMap {
if f.FdbAttr.Oif == name {
Expand Down
2 changes: 1 addition & 1 deletion pkg/loxinet/layer3.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (l3 *L3H) IfaAdd(Obj string, Cidr string) (int, error) {
ra := RtAttr{0, 0, false, ifObjID, false}
_, err = mh.zr.Rt.RtAdd(*network, RootZone, ra, nil)
if err != nil {
tk.LogIt(tk.LogDebug, "ifa add - %s:%s subnet-rt error\n", addr.String(), Obj)
tk.LogIt(tk.LogTrace, "ifa add - %s:%s subnet-rt error\n", addr.String(), Obj)
return L3AddrErr, errors.New("subnet-route add error")
} else if sz, _ := net.IPMask(network.Mask).Size(); sz != 32 && sz != 128 {
myAddr, myNet, err := net.ParseCIDR(addr.String() + "/32")
Expand Down
2 changes: 1 addition & 1 deletion pkg/loxinet/mirror.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func (M *MirrH) MirrDelete(name string) (int, error) {
}

for idx, mObj := range m.MObjs {
var pM *MirrObjInfo = &m.MObjs[idx]
pM := &m.MObjs[idx]
mObj.MirrObj2DP(DpRemove)
pM.Parent = nil
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/loxinet/neighbor.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func (n *NeighH) Activate(ne *Neigh) {
name := ne.OifPort.Name
addr := ne.Addr
var Sip net.IP
ret := -1
var ret int
if ne.OifPort.IsIPinIPTunPort() {
addr = ne.OifPort.HInfo.TunDst
ret, Sip, name = n.Zone.L3.IfaSelectAny(addr, false)
Expand Down
2 changes: 1 addition & 1 deletion pkg/loxinet/qospol.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func (P *PolH) PolDelete(pName string) (int, error) {
}

for idx, pObj := range p.PObjs {
var pP *PolObjInfo = &p.PObjs[idx]
pP := &p.PObjs[idx]
pObj.PolObj2DP(DpRemove)
pP.Parent = nil
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/loxinet/utils_cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type CloudHookInterface interface {
CloudUpdatePrivateIP(vIP net.IP, eIP net.IP, add bool) error
}

func CloudHookNew(cloudLabel string) CloudHookInterface {
func CloudHookNew(_ string) CloudHookInterface {
if mh.cloudLabel == "aws" {
return AWSCloudHookNew()
}
Expand Down
Loading