Code linting
This commit is contained in:
parent
5ceb723963
commit
71ebe1cba5
8 changed files with 34 additions and 44 deletions
|
|
@ -90,7 +90,7 @@ func TestMergeConfigMapToStruct(t *testing.T) {
|
|||
def.WorkerShutdownTimeout = "99s"
|
||||
def.NginxStatusIpv4Whitelist = []string{"127.0.0.1", "10.0.0.0/24"}
|
||||
def.NginxStatusIpv6Whitelist = []string{"::1", "2001::/16"}
|
||||
def.ProxyAddOriginalUriHeader = false
|
||||
def.ProxyAddOriginalURIHeader = false
|
||||
|
||||
hash, err := hashstructure.Hash(def, &hashstructure.HashOptions{
|
||||
TagName: "json",
|
||||
|
|
|
|||
|
|
@ -722,19 +722,6 @@ func buildUpstreamName(loc interface{}) string {
|
|||
return upstreamName
|
||||
}
|
||||
|
||||
// TODO: Needs Unit Tests
|
||||
func isSticky(host string, loc *ingress.Location, stickyLocations map[string][]string) bool {
|
||||
if _, ok := stickyLocations[host]; ok {
|
||||
for _, sl := range stickyLocations[host] {
|
||||
if sl == loc.Path {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
func buildNextUpstream(i, r interface{}) string {
|
||||
nextUpstream, ok := i.(string)
|
||||
if !ok {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue