Changed project structure

This commit is contained in:
2025-05-11 20:43:56 +03:30
parent 8be6290635
commit 3e7f6b92d3
6 changed files with 4 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
package main
import (
"CatsOfMastodonBotGo/helpers"
"CatsOfMastodonBotGo/internal/helpers"
"context"
"log"
"os"
@@ -21,6 +21,7 @@ func main() {
if instance == "" {
instance = "https://haminoa.net"
}
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
err, posts := helpers.GetPosts(ctx, tag, instance)
@@ -40,7 +41,6 @@ func main() {
var existingAccountIds = helpers.GetExistingAccountIds(db)
var newPosts = helpers.GetNewPosts(existingPostIds, posts)
var newAccounts = helpers.GetNewAccounts(existingAccountIds, newPosts)
log.Println("Number of existing posts: ", len(existingPostIds))
log.Println("Number of existing accounts: ", len(existingAccountIds))

View File

@@ -1,7 +1,7 @@
package helpers
import (
"CatsOfMastodonBotGo/models"
"CatsOfMastodonBotGo/internal/models"
"gorm.io/gorm"
)

View File

@@ -1,7 +1,7 @@
package helpers
import (
"CatsOfMastodonBotGo/models"
"CatsOfMastodonBotGo/internal/models"
"context"
"encoding/json"
"fmt"