From 0986060000702fc33d020f7b50d857d3035c1065 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=80=20?= =?UTF-8?q?=D0=9A=D0=BE=D0=BB=D0=BE=D1=81=D0=BE=D0=B2?= Date: Sat, 3 Feb 2024 02:08:10 +0500 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Add=20pointer=20to=20appli?= =?UTF-8?q?cation=20sign=20widget.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelogs/UNRELEASED.md | 2 ++ internal/.gitkeep | 0 internal/pkg/widgets/application_sign.go | 10 +++++----- 3 files changed, 7 insertions(+), 5 deletions(-) delete mode 100644 internal/.gitkeep diff --git a/changelogs/UNRELEASED.md b/changelogs/UNRELEASED.md index 7734730..77a1f3e 100644 --- a/changelogs/UNRELEASED.md +++ b/changelogs/UNRELEASED.md @@ -2,6 +2,8 @@ ## 🆕 Added +- Created widget _ApplicationSign_ + ## 💥 Breaking Changed ## 🛠 Changed diff --git a/internal/.gitkeep b/internal/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/internal/pkg/widgets/application_sign.go b/internal/pkg/widgets/application_sign.go index 95f793a..8d0f5c6 100644 --- a/internal/pkg/widgets/application_sign.go +++ b/internal/pkg/widgets/application_sign.go @@ -7,10 +7,10 @@ type ApplicationSignWidget struct { year int16 } -func ApplicationSign(name string, year int16) Widget { - return ApplicationSignWidget{name, year} -} - -func (widget ApplicationSignWidget) Render() string { +func (widget *ApplicationSignWidget) Render() string { return `󰗦 ` + widget.name + ", " + strconv.Itoa(int(widget.year)) } + +func ApplicationSign(name string, year int16) Widget { + return &ApplicationSignWidget{name, year} +}