1
0
mirror of https://github.com/mgechev/revive.git synced 2025-07-13 01:00:17 +02:00

Merge pull request #8 from mgechev/minko/unexported-return-test

Add test case for unexported-return
This commit is contained in:
Minko Gechev
2018-06-02 10:21:57 -07:00
committed by GitHub

View File

@ -17,6 +17,16 @@ func ExpErr() error { // ok
func (hidden) ExpOnHidden() hidden { // ok func (hidden) ExpOnHidden() hidden { // ok
} }
// Interface is exported.
type Interface interface {
ExpOnHidden()
}
// ExportedAsInterface returns a hidden type as an exported interface, which is fine.
func ExportedAsInterface() Interface { // ok
return Exported()
}
// T is another test type. // T is another test type.
type T struct{} type T struct{}