Skip to content

Commit 6debdd6

Browse files
committed
Introduce method HistorySize.TableString()
Use it instead of the old `TableString()` top-level function.
1 parent a394e8a commit 6debdd6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

git-sizer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ func mainImplementation() error {
172172
}
173173
fmt.Printf("%s\n", j)
174174
} else {
175-
io.WriteString(os.Stdout, sizes.TableString(historySize.Contents(), threshold, nameStyle))
175+
io.WriteString(os.Stdout, historySize.TableString(threshold, nameStyle))
176176
}
177177

178178
return nil

sizes/output.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,8 @@ type table struct {
345345
buf bytes.Buffer
346346
}
347347

348-
func TableString(contents tableContents, threshold Threshold, nameStyle NameStyle) string {
348+
func (s HistorySize) TableString(threshold Threshold, nameStyle NameStyle) string {
349+
contents := s.Contents()
349350
t := table{
350351
threshold: threshold,
351352
nameStyle: nameStyle,

0 commit comments

Comments
 (0)