diff options
| author | 2026-03-14 00:44:19 +0300 | |
|---|---|---|
| committer | 2026-03-14 00:44:19 +0300 | |
| commit | e5d6f4c02b757c83244ba5e04fead08623a27299 (patch) | |
| tree | 5b5babb9887cafa3dbc165928dc2b0fd65265bda /internal/model | |
| download | pose-e5d6f4c02b757c83244ba5e04fead08623a27299.tar.gz pose-e5d6f4c02b757c83244ba5e04fead08623a27299.tar.bz2 pose-e5d6f4c02b757c83244ba5e04fead08623a27299.tar.xz pose-e5d6f4c02b757c83244ba5e04fead08623a27299.zip | |
начальный коммит
Diffstat (limited to '')
| -rw-r--r-- | internal/model/item.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/internal/model/item.go b/internal/model/item.go new file mode 100644 index 0000000..c18d830 --- /dev/null +++ b/internal/model/item.go @@ -0,0 +1,24 @@ +package model + +import ( + "fmt" + "time" +) + +type Item struct { + ID string + Date time.Time + Title string + Summary string + Link string + Img string +} + +func (it *Item) BuildMessage() string { + return fmt.Sprintf( + `<b>%s</b><br /><br />%s<br />Читать дальше: <a href="%[3]s">%[3]s</a>`, + it.Title, + it.Summary, + it.Link, + ) +} |
