@@ -58,10 +58,6 @@ func NewActivityFromObject(o object.Object, id *url.URL) (*Activity, error) {
return a, nil
}
-func (a *Activity) Kind() string {
- return a.kind
-}
-
func (a *Activity) header(width int) string {
if a.kind == "Create" {
return ""
@@ -73,10 +73,6 @@ func NewActorFromObject(o object.Object, id *url.URL) (*Actor, error) {
-func (a *Actor) Kind() string {
func (a *Actor) Parents(quantity uint) ([]Tangible, Tangible) {
return []Tangible{}, nil
@@ -4,6 +4,7 @@ import (
"servitor/mime"
"servitor/style"
"time"
+ "servitor/ansi"
)
type Failure struct {
@@ -17,14 +18,12 @@ func NewFailure(err error) *Failure {
return &Failure{err}
-func (f *Failure) Kind() string { return "failure" }
func (f *Failure) Name() string {
return style.Problem(f.message)
func (f *Failure) Preview(width int) string {
- return f.Name()
+ return ansi.Wrap(f.Name(), width)
func (f *Failure) String(width int) string {
@@ -8,8 +8,6 @@ import (
type Any any
type Tangible interface {
- Kind() string
String(width int) string
Preview(width int) string
Parents(quantity uint) ([]Tangible, Tangible)
@@ -94,10 +94,6 @@ func NewPostFromObject(o object.Object, id *url.URL) (*Post, error) {
return p, nil
-func (p *Post) Kind() string {
- return p.kind
func (p *Post) Children() Container {
/* the if is necessary because my understanding is
the first nil is a (*Collection)(nil) whereas