From 911f456a18197c0ea7a558a95f86486a3dfc173c Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Fri, 28 Apr 2017 23:43:35 +0100 Subject: [PATCH] make Node.WithTableTruncationInformation private It is not used elsewhere and is rather specialised. --- report/table.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/report/table.go b/report/table.go index accdd6553..10177d5c8 100644 --- a/report/table.go +++ b/report/table.go @@ -20,8 +20,8 @@ const ( PropertyListType = "property-list" ) -// WithTableTruncationInformation appends table truncation info to the node, returning the new node. -func (node Node) WithTableTruncationInformation(prefix string, totalRowsCount int) Node { +// withTableTruncationInformation appends table truncation info to the node, returning the new node. +func (node Node) withTableTruncationInformation(prefix string, totalRowsCount int) Node { if totalRowsCount > MaxTableRows { truncationCount := fmt.Sprintf("%d", totalRowsCount-MaxTableRows) node = node.WithLatest(TruncationCountPrefix+prefix, mtime.Now(), truncationCount) @@ -43,7 +43,7 @@ func (node Node) AddPrefixMulticolumnTable(prefix string, rows []Row) Node { } addedRowsCount++ } - return node.WithTableTruncationInformation(prefix, len(rows)) + return node.withTableTruncationInformation(prefix, len(rows)) } // AddPrefixPropertyList appends arbitrary key-value pairs to the Node, returning a new node. @@ -56,7 +56,7 @@ func (node Node) AddPrefixPropertyList(prefix string, propertyList map[string]st node = node.WithLatest(prefix+label, mtime.Now(), value) addedPropertiesCount++ } - return node.WithTableTruncationInformation(prefix, len(propertyList)) + return node.withTableTruncationInformation(prefix, len(propertyList)) } // WithoutPrefix returns the string with trimmed prefix and a