mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +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
|
||||
ip, port, err := net.SplitHostPort(value)
|
||||
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
|
||||
}
|
||||
portInt, _ := strconv.Atoi(port)
|
||||
|
@ -884,7 +884,6 @@ func TestFinishRequest(t *testing.T) {
|
||||
timeout: time.Second,
|
||||
fn: func() (runtime.Object, error) {
|
||||
panic("my panic")
|
||||
return nil, nil
|
||||
},
|
||||
expectedObj: nil,
|
||||
expectedErr: nil,
|
||||
@ -895,7 +894,6 @@ func TestFinishRequest(t *testing.T) {
|
||||
timeout: time.Second,
|
||||
fn: func() (runtime.Object, error) {
|
||||
panic("my panic")
|
||||
return nil, nil
|
||||
},
|
||||
expectedObj: nil,
|
||||
expectedErr: nil,
|
||||
|
Loading…
Reference in New Issue
Block a user