Skip to content

Commit 29be175

Browse files
hahmadiajohnweldon
authored andcommitted
Update Print Function to Accept io.Writer and not use os.StdOut by default (#24)
* Updated print function * Address PR comments
1 parent 158c9f9 commit 29be175

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ber.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@ func PrintBytes(out io.Writer, buf []byte, indent string) {
160160
}
161161
}
162162

163+
func WritePacket(out io.Writer, p *Packet) {
164+
printPacket(out, p, 0, false)
165+
}
166+
163167
func PrintPacket(p *Packet) {
164168
printPacket(os.Stdout, p, 0, false)
165169
}

0 commit comments

Comments
 (0)