Comments (3)
Yes, ignore currently does only work on non pointer structs. To work around this issue you can declare the both methods.
// goverter:converter
type PetConverter interface {
// goverter:ignore ID
Convert2(in InPet) OutPet
Convert(in *InPet) *OutPet
}
from goverter.
Ah great!
I've opened a PR with a change that I think will 'fix' this behaviour, however I don't have a good understanding of the codebase as a whole, so I'm not sure what side effects it creates (although all the existing tests still pass): #2
from goverter.
Fixed with #2
from goverter.
Related Issues (20)
- return error from mapExtend func HOT 4
- [Questions] When generating converters, is it possible to generate constructor at the same time HOT 3
- [Questions] When generating files, is it possible to generate independent files for each struct ? HOT 4
- Allow external methods in goverter:mapExtend HOT 2
- [Questions] The underlying data types are consistent, can they be converted?
- Structure conversion error HOT 2
- [Questions] Does the generated code need optimization? HOT 1
- Is there a way to convert to code generate by protobuf oneof HOT 1
- Add reverse operation of Source Object Mapping HOT 2
- Is it possible to set to automatically ignore non-existent fields HOT 3
- Strict enum support HOT 1
- Unable to specify matchIgnoreCase at CLI args and Interface comment HOT 2
- Unable to convert pointers to direct types like *struct => struct HOT 6
- Generated file doesn't contain generic type HOT 2
- Mapping context values HOT 2
- @v0.17.1 report this error with go run :# github.com/jmattheis/goverter/xtype ../../../../pkg/mod/github.com/jmattheis/[email protected]/xtype/type.go:279:11: t.TypeArgs undefined (type *types.Named has no field or method TypeArgs) make: *** [model_convert] Error 2 HOT 3
- TypeMismatch: Cannot convert interface{} to interface{} HOT 4
- Hang / infinite loop on nested recursive slice structs HOT 2
- Version in doc is incorrect HOT 1
- Passthrough additional data to the conversion methods HOT 1
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 goverter.