go fmt
This commit is contained in:
@@ -4,8 +4,8 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
"regexp"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"regexp"
|
||||||
|
|
||||||
"github.com/chrislusf/seaweedfs/go/glog"
|
"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
|
// is a CIDR range, and we should check the
|
||||||
// remote host is within it
|
// remote host is within it
|
||||||
match, _ := regexp.MatchString("/", ip)
|
match, _ := regexp.MatchString("/", ip)
|
||||||
if ( match ) {
|
if match {
|
||||||
_, cidrnet, err := net.ParseCIDR(ip)
|
_, cidrnet, err := net.ParseCIDR(ip)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
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.
|
// Otherwise we're looking for a literal match.
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user