Changed project structure
This commit is contained in:
@@ -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))
|
@@ -1,7 +1,7 @@
|
||||
package helpers
|
||||
|
||||
import (
|
||||
"CatsOfMastodonBotGo/models"
|
||||
"CatsOfMastodonBotGo/internal/models"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
@@ -1,7 +1,7 @@
|
||||
package helpers
|
||||
|
||||
import (
|
||||
"CatsOfMastodonBotGo/models"
|
||||
"CatsOfMastodonBotGo/internal/models"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
Reference in New Issue
Block a user