Documentation ¶
Index ¶
- type StyledTextRoot
- func (sh *StyledTextRoot) Bold(s string) *StyledTextRoot
- func (sh *StyledTextRoot) Code(s string) *StyledTextRoot
- func (sh *StyledTextRoot) Italic(s string) *StyledTextRoot
- func (sh *StyledTextRoot) Link(text, url string) *StyledTextRoot
- func (sh *StyledTextRoot) Mention(text string, user interface{}) *StyledTextRoot
- func (sh *StyledTextRoot) Plain(s string) *StyledTextRoot
- func (sh *StyledTextRoot) Spoiler(s string) *StyledTextRoot
- func (sh *StyledTextRoot) Strike(s string) *StyledTextRoot
- func (sh *StyledTextRoot) Underline(s string) *StyledTextRoot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StyledTextRoot ¶
type StyledTextRoot struct {
StoArray []styling.StyledTextOption
}
StyledTextRoot is used to create an array of styling.StyledTextOption from the input string through its various methods.
func Start ¶
func Start(style styling.StyledTextOption) *StyledTextRoot
Start function creates an StyledTextRoot with the provided styling.StyledTextOption.
func (*StyledTextRoot) Bold ¶
func (sh *StyledTextRoot) Bold(s string) *StyledTextRoot
Bold appends the provided string as bold to the styled text root.
func (*StyledTextRoot) Code ¶
func (sh *StyledTextRoot) Code(s string) *StyledTextRoot
Code appends the provided string as code/mono to the styled text root.
func (*StyledTextRoot) Italic ¶
func (sh *StyledTextRoot) Italic(s string) *StyledTextRoot
Italic appends the provided string as italic to the styled text root.
func (*StyledTextRoot) Link ¶
func (sh *StyledTextRoot) Link(text, url string) *StyledTextRoot
Link appends the provided link to the styled text root.
func (*StyledTextRoot) Mention ¶
func (sh *StyledTextRoot) Mention(text string, user interface{}) *StyledTextRoot
Mention creates a telegram user mention link with the provided user and text to display.
func (*StyledTextRoot) Plain ¶
func (sh *StyledTextRoot) Plain(s string) *StyledTextRoot
Plain appends he provided string as plain text to the styled text root.
func (*StyledTextRoot) Spoiler ¶
func (sh *StyledTextRoot) Spoiler(s string) *StyledTextRoot
Spoiler appends the provided string as spoiler to the styled text root.
func (*StyledTextRoot) Strike ¶
func (sh *StyledTextRoot) Strike(s string) *StyledTextRoot
Strike appends the provided string as strike to the styled text root.
func (*StyledTextRoot) Underline ¶
func (sh *StyledTextRoot) Underline(s string) *StyledTextRoot
Underline appends the provided string as underline to the styled text root.