1
0
mirror of https://github.com/mgechev/revive.git synced 2025-01-10 03:17:11 +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
commit 99d0130dc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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{}