feragstring/title_end.go
2020-05-27 21:23:36 +02:00

32 lines
No EOL
594 B
Go

package feragstring
import "fmt"
type TitleEnd struct {
FeragMessage
titleName string
}
func (ti *TitleEnd) PrintObjectName() string {
return fmt.Sprintf("+40%-8s", ti.titleName)
}
func (ti *TitleEnd) SetTitleName(titleName string) {
ti.titleName = titleName
}
func NewTitleEnd() *TitleEnd {
t := TitleEnd{
FeragMessage: FeragMessage{
messageStart: "2441",
messageEnd: "!",
},
}
return &t
}
func (ti *TitleEnd) Message() string {
message := ti.FeragMessage.MessageTemplate()
payload := fmt.Sprintf("+40%-8s", ti.titleName)
return message(&ti.FeragMessage, payload)
}