jira-bot/pkg/templates/hello.qtpl
Andrey Belvedersky 18b2d4e554 template
2021-06-03 01:59:32 +03:00

37 lines
887 B
Plaintext

https://github.com/valyala/quicktemplate
https://github.com/valyala/quicktemplate
{% import (
"fmt"
"github.com/fatih/color"
telegram "gopkg.in/tucnak/telebot.v2"
)
%}
Приветствие пользователя
{% func Hello(name string) %}
Добрый день, *** {%s name %}!***
{% endfunc %}
Тайтл бота
{%func Title(bot *telegram.User,botVer float64, jira string) %}
{% code
d := color.New(color.FgCyan, color.Bold).SprintFunc()
v := fmt.Sprintf("version: ",)
v += d("v.",botVer ,"\n")
v += fmt.Sprintf("jira: ",)
v += d("https://",jira ,"\n")
v += fmt.Sprintf("url: " + d(" https://t.me/"+ bot.Username))
%}
_ _ _ _
(_|_)_ __ __ _ | |__ ___ | |_
| | | '__/ _` | | '_ \ / _ \| __|
| | | | | (_| | | |_) | (_) | |_
_/ |_|_| \__,_| |_.__/ \___/ \__|
|__/
{%s= v %}
{% endfunc %}