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

Add test case for unexported-return

This commit is contained in:
mgechev 2018-06-02 09:45:19 -07:00
parent f74d3bd5ee
commit 67d38b3b9f
No known key found for this signature in database
GPG Key ID: 3C44F5A2A289C6BB

View File

@ -17,6 +17,16 @@ func ExpErr() error { // 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.
type T struct{}