Chore: use any rather than interface{} (#74066)

This commit is contained in:
Ryan McKinley
2023-08-30 08:46:47 -07:00
committed by GitHub
parent 3e272d2bda
commit 025b2f3011
525 changed files with 2528 additions and 2528 deletions

View File

@ -22,8 +22,8 @@ type BasicDiff struct {
// A BasicBlock represents a top-level element in a basic diff.
type BasicBlock struct {
Title string
Old interface{}
New interface{}
Old any
New any
Change ChangeType
Changes []*BasicChange
Summaries []*BasicSummary
@ -35,8 +35,8 @@ type BasicBlock struct {
// BasicChanges in a BasicBlock.
type BasicChange struct {
Key string
Old interface{}
New interface{}
Old any
New any
Change ChangeType
LineStart int
LineEnd int
@ -60,7 +60,7 @@ type BasicFormatter struct {
tpl *template.Template
}
func NewBasicFormatter(left interface{}) *BasicFormatter {
func NewBasicFormatter(left any) *BasicFormatter {
tpl := template.Must(template.New("block").Funcs(tplFuncMap).Parse(tplBlock))
tpl = template.Must(tpl.New("change").Funcs(tplFuncMap).Parse(tplChange))
tpl = template.Must(tpl.New("summary").Funcs(tplFuncMap).Parse(tplSummary))