Comments (1)
Since the mask is recursive an empty mask assumes that everything should be copied.
Consider the following mask: a{b{d}, c}
.
If the fielda.c
is a struct then it is expected that the entire struct is copied whereas for the field a.b
only the field d
should be copied.
If you don't want this behavior for the root mask you should check if the mask is empty before calling StructToStruct
.
from fieldmask-utils.
Related Issues (19)
- Preserve field values in dst HOT 3
- question: any way to conver Mask to MaskInverse? HOT 3
- Question: Is there a way to validate Mask fields are correct? HOT 1
- protobuf v1.3.5 support HOT 3
- Error introduced upgrading to bazel_rules_go HOT 2
- Example using oneof fields and StructToStruct HOT 7
- Not copying anypb correctly? HOT 1
- CamelCase func in docs is now deprecated HOT 1
- nil slice in src not working HOT 1
- not support time.Time HOT 5
- empty slice HOT 1
- feat: support protobuf wrapper values for get the value directly. HOT 1
- *int64 panic HOT 3
- Why not support mapToStruct? HOT 1
- What I set is NOT what I get ??? HOT 2
- whether add Option SrcTag() for copy from src tag HOT 2
- question: Is it possible to map from a struct to an identical struct with pointer fields? HOT 1
- Convert protobuf message to map after applying a field mask doesn't work HOT 6
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 fieldmask-utils.