Remove the internal GitInfo type and make Page.GitInf() return a pointer

See #5693
This commit is contained in:
Bjørn Erik Pedersen
2025-07-07 13:03:57 +02:00
parent 61e6c730dd
commit 90d397b142
10 changed files with 16 additions and 62 deletions

View File

@@ -135,7 +135,7 @@ type GetPageProvider interface {
// GitInfoProvider provides Git info.
type GitInfoProvider interface {
// GitInfo returns the Git info for this object.
GitInfo() source.GitInfo
GitInfo() *source.GitInfo
// CodeOwners returns the code owners for this object.
CodeOwners() []string
}

View File

@@ -178,8 +178,8 @@ func (p *nopPage) GetTerms(taxonomy string) Pages {
return nil
}
func (p *nopPage) GitInfo() source.GitInfo {
return source.GitInfo{}
func (p *nopPage) GitInfo() *source.GitInfo {
return nil
}
func (p *nopPage) CodeOwners() []string {

View File

@@ -225,8 +225,8 @@ func (p *testPage) GetInternalRelatedDocsHandler() *RelatedDocsHandler {
return relatedDocsHandler
}
func (p *testPage) GitInfo() source.GitInfo {
return source.GitInfo{}
func (p *testPage) GitInfo() *source.GitInfo {
return nil
}
func (p *testPage) CodeOwners() []string {