added comments
This commit is contained in:
parent
a788edc546
commit
61334a79ed
@ -13,6 +13,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Mocker can generate mock structs.
|
||||||
type Mocker struct {
|
type Mocker struct {
|
||||||
src string
|
src string
|
||||||
tmpl *template.Template
|
tmpl *template.Template
|
||||||
@ -20,6 +21,7 @@ type Mocker struct {
|
|||||||
pkgs map[string]*ast.Package
|
pkgs map[string]*ast.Package
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// New makes a new Mocker for the specified package directory.
|
||||||
func New(src string) (*Mocker, error) {
|
func New(src string) (*Mocker, error) {
|
||||||
fset := token.NewFileSet()
|
fset := token.NewFileSet()
|
||||||
noTestFiles := func(i os.FileInfo) bool {
|
noTestFiles := func(i os.FileInfo) bool {
|
||||||
|
Loading…
Reference in New Issue
Block a user