Lint code
This commit is contained in:
parent
a56dd7cc38
commit
681ca36b1c
10 changed files with 21 additions and 2 deletions
|
|
@ -53,6 +53,7 @@ type BasicDigest struct {
|
|||
Secured bool `json:"secured"`
|
||||
}
|
||||
|
||||
// Equal tests for equality between two BasicDigest types
|
||||
func (bd1 *BasicDigest) Equal(bd2 *BasicDigest) bool {
|
||||
if bd1 == bd2 {
|
||||
return true
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ type External struct {
|
|||
ResponseHeaders []string `json:"responseHeaders,omitEmpty"`
|
||||
}
|
||||
|
||||
// Equal tests for equality between two External types
|
||||
func (e1 *External) Equal(e2 *External) bool {
|
||||
if e1 == e2 {
|
||||
return true
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ type AuthSSLConfig struct {
|
|||
ValidationDepth int `json:"validationDepth"`
|
||||
}
|
||||
|
||||
// Equal tests for equality between two AuthSSLConfig types
|
||||
func (assl1 *AuthSSLConfig) Equal(assl2 *AuthSSLConfig) bool {
|
||||
if assl1 == assl2 {
|
||||
return true
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ type SourceRange struct {
|
|||
CIDR []string `json:"cidr,omitEmpty"`
|
||||
}
|
||||
|
||||
// Equal tests for equality between two SourceRange types
|
||||
func (sr1 *SourceRange) Equal(sr2 *SourceRange) bool {
|
||||
if sr1 == sr2 {
|
||||
return true
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ type Configuration struct {
|
|||
NextUpstream string `json:"nextUpstream"`
|
||||
}
|
||||
|
||||
// Equal tests for equality between two Configuration types
|
||||
func (l1 *Configuration) Equal(l2 *Configuration) bool {
|
||||
if l1 == l2 {
|
||||
return true
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ type RateLimit struct {
|
|||
RPS Zone `json:"rps"`
|
||||
}
|
||||
|
||||
// Equal tests for equality between two RateLimit types
|
||||
func (rt1 *RateLimit) Equal(rt2 *RateLimit) bool {
|
||||
if rt1 == rt2 {
|
||||
return true
|
||||
|
|
@ -74,6 +75,7 @@ type Zone struct {
|
|||
SharedSize int `json:"sharedSize"`
|
||||
}
|
||||
|
||||
// Equal tests for equality between two Zone types
|
||||
func (z1 *Zone) Equal(z2 *Zone) bool {
|
||||
if z1 == z2 {
|
||||
return true
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ type Redirect struct {
|
|||
AppRoot string `json:"appRoot"`
|
||||
}
|
||||
|
||||
// Equal tests for equality between two Redirect types
|
||||
func (r1 *Redirect) Equal(r2 *Redirect) bool {
|
||||
if r1 == r2 {
|
||||
return true
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ package serviceupstream
|
|||
import (
|
||||
"testing"
|
||||
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/intstr"
|
||||
api "k8s.io/api/core/v1"
|
||||
extensions "k8s.io/api/extensions/v1beta1"
|
||||
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/intstr"
|
||||
)
|
||||
|
||||
func buildIngress() *extensions.Ingress {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue