Browse Source

go fmt

pull/220/merge
chrislusf 9 years ago
parent
commit
805740069a
  1. 5
      go/security/guard.go

5
go/security/guard.go

@ -4,8 +4,8 @@ import (
"errors"
"fmt"
"net"
"regexp"
"net/http"
"regexp"
"github.com/chrislusf/seaweedfs/go/glog"
)
@ -94,7 +94,7 @@ func (g *Guard) checkWhiteList(w http.ResponseWriter, r *http.Request) error {
// is a CIDR range, and we should check the
// remote host is within it
match, _ := regexp.MatchString("/", ip)
if ( match ) {
if match {
_, cidrnet, err := net.ParseCIDR(ip)
if err != nil {
panic(err)
@ -105,7 +105,6 @@ func (g *Guard) checkWhiteList(w http.ResponseWriter, r *http.Request) error {
}
}
//
// Otherwise we're looking for a literal match.
//

Loading…
Cancel
Save