From 2d7b5fe532650562e83aa98b1e5f2c41149dadc6 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 21 Aug 2025 16:01:05 -0500 Subject: update with code snippet --- make_chat.go | 34 ---------------------------------- 1 file changed, 34 deletions(-) (limited to 'make_chat.go') diff --git a/make_chat.go b/make_chat.go index 5c7cb75..d6616a1 100644 --- a/make_chat.go +++ b/make_chat.go @@ -1,10 +1,7 @@ package chatpb import ( - "time" - "go.wit.com/log" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" ) func TestChat() { @@ -70,34 +67,3 @@ func (c *Chats) AddTable() *Table { return t } - -func (c *Chats) AddGeminiComment(s string) { - chat := new(Chat) - - chat.From = Who_GEMINI - chat.Content = s - chat.Ctime = timestamppb.New(time.Now()) - - c.Append(chat) -} - -func (c *Chats) AddUserComment(s string) { - chat := new(Chat) - - chat.From = Who_USER - chat.Content = s - - c.Append(chat) -} - -func UnmarshalChats(data []byte) (*Chats, error) { - c := new(Chats) - err := c.Unmarshal(data) - return c, err -} - -func UnmarshalChatsTEXT(data []byte) (*Chats, error) { - c := new(Chats) - err := c.UnmarshalTEXT(data) - return c, err -} -- cgit v1.2.3