From 4be647ec0f859f327849d7ef5ff0f15a7511081f Mon Sep 17 00:00:00 2001 From: KOUNOIKE Yuusuke Date: Sun, 2 Apr 2023 02:16:14 +0900 Subject: [PATCH] =?UTF-8?q?=E5=A4=AA=E5=AD=97=E3=82=92=E4=BD=BF=E3=81=A3?= =?UTF-8?q?=E3=81=A6=E3=81=A1=E3=82=87=E3=81=A3=E3=81=A8=E8=A6=8B=E3=82=84?= =?UTF-8?q?=E3=81=99=E3=81=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/program_message.go | 10 +++++----- template/utilf_func.go | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/template/program_message.go b/template/program_message.go index 147f3cc..b4b1c65 100644 --- a/template/program_message.go +++ b/template/program_message.go @@ -13,11 +13,11 @@ type programMessageTemplateArgs struct { } const ( - programMessageTemplateString = `{{ .Program.Name }} -{{ .Program.Genre }} -{{ .Program.Description }} -{{ .Service.Name }} -{{ .Program.StartAt |toTimeStr }}~{{ .Program.Duration | toDurationStr }} + programMessageTemplateString = `**{{ .Program.Name }}** +**ジャンル**:{{ .Program.Genre }} +**説明**:{{ .Program.Description }} +**放送局**:{{ .Service.Name }} **放送時間**:{{ .Program.StartAt |toTimeStr }}~{{ .Program.Duration | toDurationStr }} +**番組詳細** {{ .Program.Json | toExtendStr }}` ) diff --git a/template/utilf_func.go b/template/utilf_func.go index 7b8bcc8..da9e10c 100644 --- a/template/utilf_func.go +++ b/template/utilf_func.go @@ -41,7 +41,7 @@ func toExtendStr(j json.RawMessage) string { any := jsoniter.Get(b, "extended") str := "" for _, key := range any.Keys() { - str += fmt.Sprintf("%s:%s\n", key, any.Get(key).ToString()) + str += fmt.Sprintf("**%s**: %s\n", key, any.Get(key).ToString()) } return str }