fsamin / go-dump Goto Github PK
View Code? Open in Web Editor NEWGo-Dump is a Golang package which helps you to dump a struct.
License: Apache License 2.0
Go-Dump is a Golang package which helps you to dump a struct.
License: Apache License 2.0
Line 219 in eb10ec4
Could you please add the struct itself to the dumped map, so that we can use with assertions like ShouldContainKey
and ShouldNotContainKey
from https://github.com/smartystreets/assertions#func--shouldcontainkey in venom ?
I think in this case, croots
could be used "as it is" for the name of the map key.
Struct zould be accessed this way:
result.struct -> interface to struct
result.struct.field1 -> interface to struct field type
...
Thanks
Could you please add a method to dump to a map[string]interface{}
?
Sample code: https://play.golang.org/p/Fj5f7y9eEpO
The date
field is not dumped because it's a time.Time
. go-dump should handle Stringer
s.
This causes an issue with Venom's sql executor because TIMESTAMPTZ
are returned as time.Time
, so we cannot make assertions on these fields
Hi,
Does the lib provide a trait i can add to my types to implements Formatter interface so that i can do fmt.Printf("%#v", xxx)
to pretty debug a type i know i need special handling type yy struct { PrettyDump }
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.