mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 08:17:26 +00:00
Fix unreachable code
This commit is contained in:
parent
8996fc1639
commit
267425667f
@ -397,7 +397,7 @@ func IsValidSocketAddr(value string) []string {
|
|||||||
var errs []string
|
var errs []string
|
||||||
ip, port, err := net.SplitHostPort(value)
|
ip, port, err := net.SplitHostPort(value)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return append(errs, "must be a valid socket address format, (e.g. 0.0.0.0:10254 or [::]:10254)")
|
errs = append(errs, "must be a valid socket address format, (e.g. 0.0.0.0:10254 or [::]:10254)")
|
||||||
return errs
|
return errs
|
||||||
}
|
}
|
||||||
portInt, _ := strconv.Atoi(port)
|
portInt, _ := strconv.Atoi(port)
|
||||||
|
@ -884,7 +884,6 @@ func TestFinishRequest(t *testing.T) {
|
|||||||
timeout: time.Second,
|
timeout: time.Second,
|
||||||
fn: func() (runtime.Object, error) {
|
fn: func() (runtime.Object, error) {
|
||||||
panic("my panic")
|
panic("my panic")
|
||||||
return nil, nil
|
|
||||||
},
|
},
|
||||||
expectedObj: nil,
|
expectedObj: nil,
|
||||||
expectedErr: nil,
|
expectedErr: nil,
|
||||||
@ -895,7 +894,6 @@ func TestFinishRequest(t *testing.T) {
|
|||||||
timeout: time.Second,
|
timeout: time.Second,
|
||||||
fn: func() (runtime.Object, error) {
|
fn: func() (runtime.Object, error) {
|
||||||
panic("my panic")
|
panic("my panic")
|
||||||
return nil, nil
|
|
||||||
},
|
},
|
||||||
expectedObj: nil,
|
expectedObj: nil,
|
||||||
expectedErr: nil,
|
expectedErr: nil,
|
||||||
|
Loading…
Reference in New Issue
Block a user