Modification: revise some errors about golint in some packages

1. pkg/client
2. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/testing

Related to: https://github.com/kubernetes/kubernetes/issues/68026
This commit is contained in:
fengzixu
2018-08-31 13:22:25 +08:00
parent 88a0987f93
commit 1fbb8b20e2
5 changed files with 9 additions and 9 deletions

View File

@@ -62,9 +62,11 @@ type ChaosNotifier interface {
// error.
type ChaosFunc func(req *http.Request) (bool, *http.Response, error)
// Intercept calls the nested method `Intercept`
func (fn ChaosFunc) Intercept(req *http.Request) (bool, *http.Response, error) {
return fn.Intercept(req)
}
func (fn ChaosFunc) String() string {
return runtime.FuncForPC(reflect.ValueOf(fn).Pointer()).Name()
}
@@ -141,7 +143,7 @@ type Error struct {
error
}
// C returns the nested error
// Intercept returns the nested error
func (e Error) Intercept(_ *http.Request) (bool, *http.Response, error) {
return true, nil, e.error
}

View File

@@ -24,6 +24,7 @@ import (
)
const (
// DefaultLeaseDuration defines a default duration of lease.
DefaultLeaseDuration = 15 * time.Second
)

View File

@@ -14,5 +14,5 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// This package runs tests against the client which require an internal client
// Package tests runs tests against the client which require an internal client
package tests