Skip to content

Commit ca4be55

Browse files
authored
Merge pull request #4 from acoshift/add-raw
add bytes in snapshot to get raw data
2 parents f9be571 + 883c829 commit ca4be55

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

snapshots.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ func (snapshot *DataSnapshot) Val(v interface{}) error {
3131
return json.NewDecoder(bytes.NewReader(snapshot.raw)).Decode(v)
3232
}
3333

34+
// Bytes returns snapshot raw data
35+
func (snapshot *DataSnapshot) Bytes() []byte {
36+
return snapshot.raw
37+
}
38+
3439
// ChildSnapshot type
3540
type ChildSnapshot struct {
3641
PrevChildKey string

0 commit comments

Comments
 (0)