1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-09-15 18:57:04 +00:00

refactor: unexport symbols

This commit is contained in:
Julien Voisin 2025-08-08 02:27:04 +02:00 committed by GitHub
parent a4d51b5586
commit 566670cc06
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
36 changed files with 369 additions and 376 deletions

View file

@ -30,9 +30,9 @@ func (a *AtomPerson) PersonName() string {
return strings.TrimSpace(a.Email)
}
type AtomPersons []*AtomPerson
type atomPersons []*AtomPerson
func (a AtomPersons) PersonNames() []string {
func (a atomPersons) personNames() []string {
var names []string
authorNamesMap := make(map[string]bool)
@ -56,9 +56,9 @@ type AtomLink struct {
Title string `xml:"title,attr"`
}
type AtomLinks []*AtomLink
type atomLinks []*AtomLink
func (a AtomLinks) OriginalLink() string {
func (a atomLinks) originalLink() string {
for _, link := range a {
if strings.EqualFold(link.Rel, "alternate") {
return strings.TrimSpace(link.Href)
@ -72,7 +72,7 @@ func (a AtomLinks) OriginalLink() string {
return ""
}
func (a AtomLinks) firstLinkWithRelation(relation string) string {
func (a atomLinks) firstLinkWithRelation(relation string) string {
for _, link := range a {
if strings.EqualFold(link.Rel, relation) {
return strings.TrimSpace(link.Href)
@ -82,7 +82,7 @@ func (a AtomLinks) firstLinkWithRelation(relation string) string {
return ""
}
func (a AtomLinks) firstLinkWithRelationAndType(relation string, contentTypes ...string) string {
func (a atomLinks) firstLinkWithRelationAndType(relation string, contentTypes ...string) string {
for _, link := range a {
if strings.EqualFold(link.Rel, relation) {
for _, contentType := range contentTypes {
@ -96,7 +96,7 @@ func (a AtomLinks) firstLinkWithRelationAndType(relation string, contentTypes ..
return ""
}
func (a AtomLinks) findAllLinksWithRelation(relation string) []*AtomLink {
func (a atomLinks) findAllLinksWithRelation(relation string) []*AtomLink {
var links []*AtomLink
for _, link := range a {
@ -116,7 +116,7 @@ func (a AtomLinks) findAllLinksWithRelation(relation string) []*AtomLink {
// meaning to the content (if any) of this element.
//
// Specs: https://datatracker.ietf.org/doc/html/rfc4287#section-4.2.2
type AtomCategory struct {
type atomCategory struct {
// The "term" attribute is a string that identifies the category to
// which the entry or feed belongs. Category elements MUST have a
// "term" attribute.
@ -134,9 +134,9 @@ type AtomCategory struct {
Label string `xml:"label,attr"`
}
type AtomCategories []AtomCategory
type atomCategories []atomCategory
func (ac AtomCategories) CategoryNames() []string {
func (ac atomCategories) CategoryNames() []string {
var categories []string
for _, category := range ac {