Author now has Name() over Namer
Prior to this commit, interface Author embedded interface Namer. This doesn't work, as it is discouraged to keep a working state inside the implementation of Author, but Namer's embedded Iconer requires a state. The commit changed Author to use a Name method instead, which is only a getter. It will no longer satisfy interface Name.
This commit is contained in:
parent
1588cfef9c
commit
aaa29f35b0
3
cchat.go
3
cchat.go
|
@ -210,7 +210,8 @@ type Authenticator interface {
|
|||
// The frontend may use the ID to squash messages with the same author together.
|
||||
type Author interface {
|
||||
Identifier
|
||||
Namer
|
||||
|
||||
Name() text.Rich
|
||||
}
|
||||
|
||||
// Backlogger adds message history capabilities into a message container. The
|
||||
|
|
|
@ -589,7 +589,14 @@ var Main = Packages{
|
|||
Name: "Author",
|
||||
Embeds: []EmbeddedInterface{
|
||||
{InterfaceName: "Identifier"},
|
||||
{InterfaceName: "Namer"},
|
||||
},
|
||||
Methods: []Method{
|
||||
GetterMethod{
|
||||
method: method{Name: "Name"},
|
||||
Returns: []NamedType{{
|
||||
Type: MakeQual("text", "Rich"),
|
||||
}},
|
||||
},
|
||||
},
|
||||
}, {
|
||||
Comment: Comment{`
|
||||
|
|
Loading…
Reference in New Issue