From 279ee9e1026f74f923766286b767d4df3901b82f Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 12 Sep 2024 23:04:04 +0300 Subject: can set an entry shared --- internal/types/entry.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'internal') diff --git a/internal/types/entry.go b/internal/types/entry.go index f17c06a..6e06aec 100644 --- a/internal/types/entry.go +++ b/internal/types/entry.go @@ -8,6 +8,7 @@ import ( "os" "sort" "strings" + "time" ) type EntryID = string @@ -94,6 +95,14 @@ func (e Entry) IsShared(platform PlatformName) bool { return shared.Is } +func (e Entry) SetShared(platform PlatformName) Entry { + e.Shared[platform] = Shared{ + Is: true, + Timestamp: time.Now().Format("20060102150405"), + } + return e +} + /** * This updates the entry with the other entry. The Shared slice will also be * updated. If entry is missing, it will be added. If entry is there, the shared -- cgit v1.2.3