Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'hugolib/template_test.go')
-rw-r--r--hugolib/template_test.go22
1 files changed, 3 insertions, 19 deletions
diff --git a/hugolib/template_test.go b/hugolib/template_test.go
index ccf5d103e..99e57c75f 100644
--- a/hugolib/template_test.go
+++ b/hugolib/template_test.go
@@ -16,6 +16,7 @@ package hugolib
import (
"fmt"
"path/filepath"
+ "strings"
"testing"
"github.com/gohugoio/hugo/identity"
@@ -656,23 +657,6 @@ func collectIdentities(set map[identity.Identity]bool, provider identity.Provide
}
}
-func printRecursiveIdentities(level int, id identity.Provider) {
- if level == 0 {
- fmt.Println(id.GetIdentity(), "===>")
- }
- if ids, ok := id.(identity.IdentitiesProvider); ok {
- level++
- for _, id := range ids.GetIdentities() {
- printRecursiveIdentities(level, id)
- }
- } else {
- ident(level)
- fmt.Println("ID", id)
- }
-}
-
-func ident(n int) {
- for i := 0; i < n; i++ {
- fmt.Print(" ")
- }
+func ident(level int) string {
+ return strings.Repeat(" ", level)
}