Skip to content

Commit

Permalink
Comment out all lines with encodeIndent variable
Browse files Browse the repository at this point in the history
  • Loading branch information
lchudinov authored and fullsailor committed Apr 4, 2019
1 parent 8306686 commit d7302db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ber.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"errors"
)

var encodeIndent = 0
// var encodeIndent = 0

type asn1Object interface {
EncodeTo(writer *bytes.Buffer) error
Expand All @@ -18,15 +18,15 @@ type asn1Structured struct {

func (s asn1Structured) EncodeTo(out *bytes.Buffer) error {
//fmt.Printf("%s--> tag: % X\n", strings.Repeat("| ", encodeIndent), s.tagBytes)
encodeIndent++
//encodeIndent++
inner := new(bytes.Buffer)
for _, obj := range s.content {
err := obj.EncodeTo(inner)
if err != nil {
return err
}
}
encodeIndent--
//encodeIndent--
out.Write(s.tagBytes)
encodeLength(out, inner.Len())
out.Write(inner.Bytes())
Expand Down

0 comments on commit d7302db

Please sign in to comment.