enbas/internal/model/follows.go

42 lines
666 B
Go
Raw Normal View History

2024-05-20 14:59:03 +01:00
package model
import (
"fmt"
"codeflow.dananglin.me.uk/apollo/enbas/internal/utilities"
)
type Followers []Account
func (f Followers) String() string {
output := "\n"
2024-05-20 15:41:45 +01:00
output += utilities.HeaderFormat("FOLLOWED BY:")
for i := range f {
output += fmt.Sprintf(
"\n • %s (%s)",
utilities.DisplayNameFormat(f[i].DisplayName),
f[i].Acct,
)
}
return output
}
type Following []Account
func (f Following) String() string {
output := "\n"
output += utilities.HeaderFormat("FOLLOWING:")
2024-05-20 14:59:03 +01:00
for i := range f {
output += fmt.Sprintf(
"\n • %s (%s)",
utilities.DisplayNameFormat(f[i].DisplayName),
f[i].Acct,
)
}
return output
}