Skip to content

Commit 383532a

Browse files
committed
simplify
1 parent 0477561 commit 383532a

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

io.go

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -73,23 +73,6 @@ func NewCborWriter(w io.Writer) *CborWriter {
7373
return cw
7474
}
7575

76-
// Init is half way between NewCborWriter and .SetWriter()
77-
// If the passed in writer is a *CborWriter then return that,
78-
// otherwise set up *cw
79-
func (cw *CborWriter) Init(w io.Writer) *CborWriter {
80-
if w, ok := w.(*CborWriter); ok {
81-
return w
82-
}
83-
84-
cw.w = w
85-
86-
if sw, ok := w.(io.StringWriter); ok {
87-
cw.sw = sw
88-
}
89-
90-
return cw
91-
}
92-
9376
func (cw *CborWriter) SetWriter(w io.Writer) {
9477
cw.w = w
9578
if sw, ok := w.(io.StringWriter); ok {

0 commit comments

Comments
 (0)