Skip to content

Commit

Permalink
Merge pull request #68113 from fengzixu/master
Browse files Browse the repository at this point in the history
Fixes #68026: revise some errors about golint in some packages
  • Loading branch information
k8s-ci-robot committed Sep 25, 2018
2 parents 893e87b + 1fbb8b2 commit 5b864ac
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
3 changes: 0 additions & 3 deletions hack/.golint_failures
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ pkg/apis/storage/v1beta1
pkg/apis/storage/v1beta1/util
pkg/auth/authorizer/abac
pkg/capabilities
pkg/client/chaosclient
pkg/client/leaderelectionconfig
pkg/client/tests
pkg/cloudprovider
pkg/cloudprovider/providers/aws
pkg/cloudprovider/providers/fake
Expand Down
4 changes: 3 additions & 1 deletion pkg/client/chaosclient/chaosclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down Expand Up @@ -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
}
Expand Down
1 change: 1 addition & 0 deletions pkg/client/leaderelectionconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
)

const (
// DefaultLeaseDuration defines a default duration of lease.
DefaultLeaseDuration = 15 * time.Second
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/client/tests/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ var matchEverythingRules = []registrationv1beta1.RuleWithOperations{{
},
}}

var sideEffectsUnknown registrationv1beta1.SideEffectClass = registrationv1beta1.SideEffectClassUnknown
var sideEffectsNone registrationv1beta1.SideEffectClass = registrationv1beta1.SideEffectClassNone
var sideEffectsSome registrationv1beta1.SideEffectClass = registrationv1beta1.SideEffectClassSome
var sideEffectsNoneOnDryRun registrationv1beta1.SideEffectClass = registrationv1beta1.SideEffectClassNoneOnDryRun
var sideEffectsUnknown = registrationv1beta1.SideEffectClassUnknown
var sideEffectsNone = registrationv1beta1.SideEffectClassNone
var sideEffectsSome = registrationv1beta1.SideEffectClassSome
var sideEffectsNoneOnDryRun = registrationv1beta1.SideEffectClassNoneOnDryRun

// NewFakeDataSource returns a mock client and informer returning the given webhooks.
func NewFakeDataSource(name string, webhooks []registrationv1beta1.Webhook, mutating bool, stopCh <-chan struct{}) (clientset kubernetes.Interface, factory informers.SharedInformerFactory) {
Expand Down

0 comments on commit 5b864ac

Please sign in to comment.