Comments (2)
Hey @geekofalltrades,
I think the problem here is a _test.go suffix rather than internal package because it works fine with internal packages.
Try putting the interface you're trying to generate decorator for somewhere else. There's not very much sense to parse test files.
Let me know if it's your case. I think I have to document it because it's not the first time people face this issue.
from gowrap.
This seemed to be working in a _test.go file when I moved that file out of an internal package.
Also, it makes sense to me to have this particular interface in a _test.go file, because I'm using it to test a custom gowrap template.
But, there was no non-_test.go
-suffixed file in the directory, so possibly the whole directory was not registering as a Go package. And when I moved it out of the internal package, it was into a directory that had other go files in it that were not _test.go files.
from gowrap.
Related Issues (20)
- Unable to generate if destination directory does not contain go files HOT 1
- Allowing specifying custom package HOT 6
- Wrong position of package comment if template has no own `import` HOT 2
- Imports of modules with custom names are not included into generated code HOT 8
- Cannot iterate over m.Params names HOT 1
- comments on the top of generated file HOT 2
- Unable to install this package HOT 3
- Add Masterminds/sprig template functions HOT 1
- method.Declaration does not add package names in argument types and return types HOT 5
- gowrap version cmd
- .Interface.Methods no longer contains nested methods HOT 2
- Appear in Nixpkgs HOT 1
- Add support for build tags HOT 1
- template path in generated code uses OS specific path separators HOT 1
- Method.ReturnsError is not a proper interface/implements check
- Merge generated file with existing instead of overwriting
- Can't loading template during the gen
- "Redeclared as the imported package name" error when main module and one of dependencies have the same last part HOT 1
- Generated imports fail when we have an alias
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gowrap.