summaryrefslogtreecommitdiff
path: root/vendor/github.com/golang/mock/mockgen/tests/unexported_method/bugreport.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/golang/mock/mockgen/tests/unexported_method/bugreport.go')
-rw-r--r--vendor/github.com/golang/mock/mockgen/tests/unexported_method/bugreport.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/vendor/github.com/golang/mock/mockgen/tests/unexported_method/bugreport.go b/vendor/github.com/golang/mock/mockgen/tests/unexported_method/bugreport.go
new file mode 100644
index 0000000..91d5baf
--- /dev/null
+++ b/vendor/github.com/golang/mock/mockgen/tests/unexported_method/bugreport.go
@@ -0,0 +1,15 @@
+//go:generate mockgen -destination bugreport_mock.go -package bugreport -source=bugreport.go Example
+
+package bugreport
+
+import "fmt"
+
+// Example is an interface with a non exported method
+type Example interface {
+ someMethod(string) string
+}
+
+// CallExample is a simple function that uses the interface
+func CallExample(e Example) {
+ fmt.Println(e.someMethod("test"))
+}