Skip to content

Commit

Permalink
Remove some unwanted code
Browse files Browse the repository at this point in the history
  • Loading branch information
fireworkmarks authored and cxt90730 committed Oct 30, 2019
1 parent d1c47f8 commit 1db9409
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions api/log-replacer.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
package api

import (
"bytes"
"net"
"net/http"
"strconv"
"strings"
Expand Down Expand Up @@ -298,21 +296,6 @@ func (r *replacer) Set(key, value string) {
r.customReplacements["{"+key+"}"] = value
}

//ipRange - a structure that holds the start and end of a range of ip addresses
type ipRange struct {
start net.IP
end net.IP
}

// inRange - check to see if a given ip address is within a range given
func inRange(r ipRange, ipAddress net.IP) bool {
// strcmp type byte comparison
if bytes.Compare(ipAddress, r.start) >= 0 && bytes.Compare(ipAddress, r.end) < 0 {
return true
}
return false
}

type JudgeCdnRequest func(r *http.Request) bool

func judgeCdnRequestFromQuery(r *http.Request) bool {
Expand Down

0 comments on commit 1db9409

Please sign in to comment.