File: bugreport.go

package info (click to toggle)
golang-go.uber-mock 0.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,176 kB
  • sloc: sh: 37; makefile: 3
file content (15 lines) | stat: -rw-r--r-- 371 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package bugreport

//go:generate mockgen -destination bugreport_mock.go -package bugreport -source=bugreport.go Example

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"))
}