Skip to content

Commit

Permalink
Merge pull request vektra#79 from daniellowtw/fix-golint-compliance
Browse files Browse the repository at this point in the history
Fix comments so that golint doesn't complain
  • Loading branch information
evanphx committed May 10, 2016
2 parents bfcaaab + c632e48 commit 3603a98
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion mockery/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ func (g *Generator) Generate() error {
return ErrNotSetup
}

g.printf("// This is an autogenerated mock type for the %s type\n", g.iface.Name)
g.printf("// %s is an autogenerated mock type for the %s type\n", g.mockName(), g.iface.Name)
g.printf("type %s struct {\n\tmock.Mock\n}\n\n", g.mockName())

for i := 0; i < g.iface.Type.NumMethods(); i++ {
Expand Down
40 changes: 20 additions & 20 deletions mockery/generator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func TestGenerator(t *testing.T) {
err = gen.Generate()
assert.NoError(t, err)

expected := `// This is an autogenerated mock type for the Requester type
expected := `// Requester is an autogenerated mock type for the Requester type
type Requester struct {
mock.Mock
}
Expand Down Expand Up @@ -61,7 +61,7 @@ func TestGeneratorSingleReturn(t *testing.T) {
err = gen.Generate()
assert.NoError(t, err)

expected := `// This is an autogenerated mock type for the Requester2 type
expected := `// Requester2 is an autogenerated mock type for the Requester2 type
type Requester2 struct {
mock.Mock
}
Expand Down Expand Up @@ -95,7 +95,7 @@ func TestGeneratorNoArguments(t *testing.T) {
err = gen.Generate()
assert.NoError(t, err)

expected := `// This is an autogenerated mock type for the Requester3 type
expected := `// Requester3 is an autogenerated mock type for the Requester3 type
type Requester3 struct {
mock.Mock
}
Expand Down Expand Up @@ -129,7 +129,7 @@ func TestGeneratorNoNothing(t *testing.T) {
err = gen.Generate()
assert.NoError(t, err)

expected := `// This is an autogenerated mock type for the Requester4 type
expected := `// Requester4 is an autogenerated mock type for the Requester4 type
type Requester4 struct {
mock.Mock
}
Expand All @@ -155,7 +155,7 @@ func TestGeneratorUnexported(t *testing.T) {
err = gen.Generate()
assert.NoError(t, err)

expected := `// This is an autogenerated mock type for the requester type
expected := `// mockRequester is an autogenerated mock type for the requester type
type mockRequester struct {
mock.Mock
}
Expand Down Expand Up @@ -254,7 +254,7 @@ func TestGeneratorChecksInterfacesForNilable(t *testing.T) {
err = gen.Generate()
assert.NoError(t, err)

expected := `// This is an autogenerated mock type for the RequesterIface type
expected := `// RequesterIface is an autogenerated mock type for the RequesterIface type
type RequesterIface struct {
mock.Mock
}
Expand Down Expand Up @@ -291,7 +291,7 @@ func TestGeneratorPointers(t *testing.T) {
err = gen.Generate()
assert.NoError(t, err)

expected := `// This is an autogenerated mock type for the RequesterPtr type
expected := `// RequesterPtr is an autogenerated mock type for the RequesterPtr type
type RequesterPtr struct {
mock.Mock
}
Expand Down Expand Up @@ -335,7 +335,7 @@ func TestGeneratorSlice(t *testing.T) {
err = gen.Generate()
assert.NoError(t, err)

expected := `// This is an autogenerated mock type for the RequesterSlice type
expected := `// RequesterSlice is an autogenerated mock type for the RequesterSlice type
type RequesterSlice struct {
mock.Mock
}
Expand Down Expand Up @@ -379,7 +379,7 @@ func TestGeneratorArrayLiteralLen(t *testing.T) {
err = gen.Generate()
assert.NoError(t, err)

expected := `// This is an autogenerated mock type for the RequesterArray type
expected := `// RequesterArray is an autogenerated mock type for the RequesterArray type
type RequesterArray struct {
mock.Mock
}
Expand Down Expand Up @@ -424,7 +424,7 @@ func TestGeneratorNamespacedTypes(t *testing.T) {
err = gen.Generate()
assert.NoError(t, err)

expected := `// This is an autogenerated mock type for the RequesterNS type
expected := `// RequesterNS is an autogenerated mock type for the RequesterNS type
type RequesterNS struct {
mock.Mock
}
Expand Down Expand Up @@ -468,7 +468,7 @@ func TestGeneratorHavingNoNamesOnArguments(t *testing.T) {
err = gen.Generate()
assert.NoError(t, err)

expected := `// This is an autogenerated mock type for the KeyManager type
expected := `// KeyManager is an autogenerated mock type for the KeyManager type
type KeyManager struct {
mock.Mock
}
Expand Down Expand Up @@ -513,7 +513,7 @@ func TestGeneratorElidedType(t *testing.T) {
err = gen.Generate()
assert.NoError(t, err)

expected := `// This is an autogenerated mock type for the RequesterElided type
expected := `// RequesterElided is an autogenerated mock type for the RequesterElided type
type RequesterElided struct {
mock.Mock
}
Expand Down Expand Up @@ -547,7 +547,7 @@ func TestGeneratorReturnElidedType(t *testing.T) {
err = gen.Generate()
assert.NoError(t, err)

expected := `// This is an autogenerated mock type for the RequesterReturnElided type
expected := `// RequesterReturnElided is an autogenerated mock type for the RequesterReturnElided type
type RequesterReturnElided struct {
mock.Mock
}
Expand Down Expand Up @@ -603,7 +603,7 @@ func TestGeneratorVariableArgs(t *testing.T) {
err = gen.Generate()
assert.NoError(t, err)

expected := `// This is an autogenerated mock type for the RequesterVariable type
expected := `// RequesterVariable is an autogenerated mock type for the RequesterVariable type
type RequesterVariable struct {
mock.Mock
}
Expand Down Expand Up @@ -637,7 +637,7 @@ func TestGeneratorFuncType(t *testing.T) {
err = gen.Generate()
assert.NoError(t, err)

expected := `// This is an autogenerated mock type for the Fooer type
expected := `// Fooer is an autogenerated mock type for the Fooer type
type Fooer struct {
mock.Mock
}
Expand Down Expand Up @@ -690,7 +690,7 @@ func TestGeneratorChanType(t *testing.T) {
err = gen.Generate()
assert.NoError(t, err)

expected := `// This is an autogenerated mock type for the AsyncProducer type
expected := `// AsyncProducer is an autogenerated mock type for the AsyncProducer type
type AsyncProducer struct {
mock.Mock
}
Expand Down Expand Up @@ -757,7 +757,7 @@ func TestGeneratorFromImport(t *testing.T) {
err = gen.Generate()
assert.NoError(t, err)

expected := `// This is an autogenerated mock type for the MyReader type
expected := `// MyReader is an autogenerated mock type for the MyReader type
type MyReader struct {
mock.Mock
}
Expand Down Expand Up @@ -799,7 +799,7 @@ func TestGeneratorComplexChanFromConsul(t *testing.T) {
err = gen.Generate()
assert.NoError(t, err)

expected := `// This is an autogenerated mock type for the ConsulLock type
expected := `// ConsulLock is an autogenerated mock type for the ConsulLock type
type ConsulLock struct {
mock.Mock
}
Expand Down Expand Up @@ -855,7 +855,7 @@ func TestGeneratorForEmptyInterface(t *testing.T) {
err = gen.Generate()
assert.NoError(t, err)

expected := `// This is an autogenerated mock type for the Blank type
expected := `// Blank is an autogenerated mock type for the Blank type
type Blank struct {
mock.Mock
}
Expand Down Expand Up @@ -889,7 +889,7 @@ func TestGeneratorForMapFunc(t *testing.T) {
err = gen.Generate()
assert.NoError(t, err)

expected := `// This is an autogenerated mock type for the MapFunc type
expected := `// MapFunc is an autogenerated mock type for the MapFunc type
type MapFunc struct {
mock.Mock
}
Expand Down

0 comments on commit 3603a98

Please sign in to comment.