Skip to content

Commit

Permalink
loxilb-iogh-61 gofmt suggested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
PacketCrunch committed Dec 22, 2022
1 parent 6f48224 commit 1868410
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
14 changes: 7 additions & 7 deletions cicd/perf/webserver.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package main

import (
"log"
"net/http"
"log"
"net/http"
)

func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {

})
if err := http.ListenAndServe(":8080", nil); err != nil {
log.Fatal("ListenAndServe: ", err)
}
})
if err := http.ListenAndServe(":8080", nil); err != nil {
log.Fatal("ListenAndServe: ", err)
}
}
2 changes: 1 addition & 1 deletion common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ type FwOptArg struct {
// Allow - Allow any matching rule
Allow bool `json:"allow"`
// Mark - Mark the matching rule
Mark uint32 `json:"fwMark"`
Mark uint32 `json:"fwMark"`
}

// FwRuleArg - Information related to firewall rule
Expand Down
2 changes: 1 addition & 1 deletion loxinet/dpbroker.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ type NatDpWorkQ struct {
ServiceIP net.IP
L4Port uint16
BlockNum uint16
DsrMode bool
DsrMode bool
Proto uint8
HwMark int
NatType NatT
Expand Down
12 changes: 6 additions & 6 deletions loxinet/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ func (R *RuleH) GetNatLbRule() ([]cmn.LbRuleMod, error) {
EpIP: ep.xIP.String(),
EpPort: ep.xPort,
Weight: ep.weight,
State : state,
State: state,
})
}
// Make LB rule
Expand Down Expand Up @@ -801,7 +801,7 @@ func (R *RuleH) AddNatLbRule(serv cmn.LbServiceArg, servEndPoints []cmn.LbEndPoi
return RuleUnknownServiceErr, errors.New("malformed-service error")
}

if natActs.mode == cmn.LBModeDSR && k.EpPort != serv.ServPort {
if natActs.mode == cmn.LBModeDSR && k.EpPort != serv.ServPort {
return RuleUnknownServiceErr, errors.New("malformed-service dsr-port error")
}
ep := ruleNatEp{pNetAddr, k.EpPort, k.Weight, 0, false, false, false}
Expand Down Expand Up @@ -1342,7 +1342,7 @@ func (ep *epHost) epCheckNow() {
pinger.Count = ep.opts.inActTryThr
pinger.Size = 100
pinger.Interval = time.Duration(200000000)
pinger.Timeout = time.Duration(500000000)
pinger.Timeout = time.Duration(500000000)
pinger.SetPrivileged(true)

//pinger.OnFinish = func(stats *ping.Statistics) {
Expand Down Expand Up @@ -1425,9 +1425,9 @@ func epTicker(R *RuleH, helper int) {

cnt := 0
for _, eph := range epHosts {
eph.epCheckNow()
eph.sT = time.Now()
cnt++
eph.epCheckNow()
eph.sT = time.Now()
cnt++
}
epHosts = nil
}
Expand Down

0 comments on commit 1868410

Please sign in to comment.