summaryrefslogtreecommitdiff
path: root/add.go
diff options
context:
space:
mode:
Diffstat (limited to 'add.go')
-rw-r--r--add.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/add.go b/add.go
index 02b42a6..88d4ceb 100644
--- a/add.go
+++ b/add.go
@@ -28,10 +28,10 @@ func addFile(filename string) (*chatpb.Chats, error) {
logDir := filepath.Dir(filename)
// Iterate through the structure to inline all external content.
- for _, chat := range logData.GetChats() {
- for _, entry := range chat.GetEntries() {
+ for _, chat := range logData.Chats {
+ for _, entry := range chat.Entries {
// Inline main content from ContentFile
- if contentFile := entry.GetContentFile(); contentFile != "" {
+ if contentFile := entry.ContentFile; contentFile != "" {
contentPath := filepath.Join(logDir, contentFile)
contentBytes, err := os.ReadFile(contentPath)
if err != nil {
@@ -42,9 +42,9 @@ func addFile(filename string) (*chatpb.Chats, error) {
}
// Inline snippet content from snippet files
- if snippets := entry.GetSnippets(); snippets != nil {
+ if snippets := entry.Snippets; snippets != nil {
for _, snippet := range snippets {
- if snippetFile := snippet.GetFilename(); snippetFile != "" {
+ if snippetFile := snippet.Filename; snippetFile != "" {
snippetPath := filepath.Join(logDir, snippetFile)
contentBytes, err := os.ReadFile(snippetPath)
if err != nil {