Skip to content

Commit

Permalink
Fixes -inpkg when its a main package, all objects in the package were
Browse files Browse the repository at this point in the history
prefixed with `main.`
  • Loading branch information
abourget committed Apr 14, 2016
1 parent 7af274c commit 03b2d81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mockery/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func renderType(t types.Type) string {
switch t := t.(type) {
case *types.Named:
o := t.Obj()
if o.Pkg() == nil {
if o.Pkg() == nil || o.Pkg().Name() == "main" {
return o.Name()
} else {
return o.Pkg().Name() + "." + o.Name()
Expand Down

0 comments on commit 03b2d81

Please sign in to comment.