Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable names conflicts it generated mocks #20

Closed
8tomat8 opened this issue Apr 19, 2018 · 2 comments
Closed

Variable names conflicts it generated mocks #20

8tomat8 opened this issue Apr 19, 2018 · 2 comments
Assignees
Labels

Comments

@8tomat8
Copy link

8tomat8 commented Apr 19, 2018

What did you do?

type Type struct{}

//go:generate charlatan -output ./mockTypesDAL.go TypesDAL
type TypesDAL interface {
	Get(id uint64) (t *Type, err error)
}

What did you expect to see?

Expected generated valid go code or some error

What did you see instead?

Generated functions "NewFake*" with name conflicts.
I think it because of the first letter of struct name.

System details

Package version v1.0.4 ( 4cd615c )

go version go1.10.1 linux/amd64
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/tomat/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/tomat/Projects/go"
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build652025093=/tmp/go-build -gno-record-gcc-switches"
GOROOT/bin/go version: go version go1.10.1 linux/amd64
GOROOT/bin/go tool compile -V: compile version go1.10.1
uname -sr: Linux 4.14.34-1-MANJARO
LSB Version:	n/a
Distributor ID:	ManjaroLinux
Description:	Manjaro Linux
Release:	17.1.8
Codename:	Hakoila
/usr/lib/libc.so.6: GNU C Library (GNU libc) stable release version 2.26, by Roland McGrath et al.
@kevinbirch
Copy link
Contributor

@8tomat8 you should be all set with the latest version

@8tomat8
Copy link
Author

8tomat8 commented Apr 20, 2018

@kevinbirch Thanks. Now it works well =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants