Skip to content

Commit

Permalink
Add strings and use strings.Repeat
Browse files Browse the repository at this point in the history
  • Loading branch information
Manav-Aggarwal committed Oct 28, 2022
1 parent 55965ae commit efdc8ad
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions deepsubtree.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"encoding/binary"
"errors"
"fmt"
"strings"

ics23 "github.com/confio/ics23/go"
)
Expand Down Expand Up @@ -213,10 +214,7 @@ func (dst *DeepSubTree) recursiveSet(node *Node, key []byte, value []byte) (
// Prints a Deep Subtree recursively.
// Modified version of printNode from util.go
func (dst *DeepSubTree) printNodeDeepSubtree(node *Node, indent int) error {
indentPrefix := ""
for i := 0; i < indent; i++ {
indentPrefix += " "
}
indentPrefix := strings.Repeat(" ", indent)

if node == nil {
fmt.Printf("%s<nil>\n", indentPrefix)
Expand Down

0 comments on commit efdc8ad

Please sign in to comment.