Added comments to FeragMessage and TitleEnd
This commit is contained in:
parent
5c415c5aac
commit
68cf7ef7db
2 changed files with 13 additions and 2 deletions
|
|
@ -5,6 +5,8 @@ import (
|
|||
"strings"
|
||||
)
|
||||
|
||||
// FeragMessage is the struct for the "abstract" message.
|
||||
// It is meant to be embedded into the real message structs.
|
||||
type FeragMessage struct {
|
||||
messageStart string
|
||||
messageEnd string
|
||||
|
|
@ -18,8 +20,12 @@ func (fm *FeragMessage) getMessageEnd() string {
|
|||
return fmt.Sprintf("%s", fm.messageEnd)
|
||||
}
|
||||
|
||||
// MessageTemplateFunc is a func type for the generating the
|
||||
// FERAG-formatted message.
|
||||
type MessageTemplateFunc func(*FeragMessage, string) string
|
||||
|
||||
// MessageTemplate returns a MessageTemplateFunc - to be called
|
||||
// from within the "real" message structs.
|
||||
func (fm *FeragMessage) MessageTemplate() MessageTemplateFunc {
|
||||
return func(fm *FeragMessage, s string) string {
|
||||
message := fm.getMessageStart()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue