trans to private
Some checks failed
release / goreleaser (push) Failing after 2m23s
docker / prepare-and-build (push) Failing after 2m55s

This commit is contained in:
Nite07 2024-11-20 19:09:04 +08:00
parent dd46edb310
commit 304517e241
71 changed files with 169 additions and 176 deletions

View File

@ -17,8 +17,7 @@ jobs:
uses: docker/metadata-action@v5 uses: docker/metadata-action@v5
with: with:
images: | images: |
nite07/pcgamedb git.nite07.com/nite07/pcgamedb
git.drevox.top/code/pcgamedb
tags: | tags: |
type=semver,pattern={{version}} type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}}.{{minor}}
@ -30,12 +29,6 @@ jobs:
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to Gitea - name: Login to Gitea
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:

View File

@ -16,7 +16,7 @@ builds:
- arm - arm
- "386" - "386"
ldflags: ldflags:
- -s -w -X github.com/nitezs/pcgamedb/constant.Version={{ .Version }} - -s -w -X pcgamedb/constant.Version={{ .Version }}
flags: flags:
- -trimpath - -trimpath
archives: archives:

View File

@ -14,7 +14,7 @@ ARG version=dev
RUN if [ "$version" = "dev" ]; then \ RUN if [ "$version" = "dev" ]; then \
version=$(git describe --tags --always); \ version=$(git describe --tags --always); \
fi && \ fi && \
CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w -X github.com/nitezs/pcgamedb/constant.Version=${version}" -o pcgamedb . CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w -X pcgamedb/constant.Version=${version}" -o pcgamedb .
FROM alpine:latest FROM alpine:latest
WORKDIR /app WORKDIR /app

View File

@ -1,4 +1,4 @@
go install github.com/swaggo/swag/cmd/swag@latest go install github.com/swaggo/swag/cmd/swag@latest
swag init swag init
CGO_ENABLED=0 CGO_ENABLED=0
go build -o pcgamedb -ldflags "-s -w -X github.com/nitezs/pcgamedb/constant.Version=$(git describe --tags --always)" . go build -o pcgamedb -ldflags "-s -w -X pcgamedb/constant.Version=$(git describe --tags --always)" .

4
cache/redis.go vendored
View File

@ -6,8 +6,8 @@ import (
"sync" "sync"
"time" "time"
"github.com/nitezs/pcgamedb/config" "pcgamedb/config"
"github.com/nitezs/pcgamedb/log" "pcgamedb/log"
"github.com/redis/go-redis/v9" "github.com/redis/go-redis/v9"
) )

View File

@ -1,8 +1,8 @@
package cmd package cmd
import ( import (
"github.com/nitezs/pcgamedb/log" "pcgamedb/log"
"github.com/nitezs/pcgamedb/task" "pcgamedb/task"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )

View File

@ -6,9 +6,9 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/nitezs/pcgamedb/crawler" "pcgamedb/crawler"
"github.com/nitezs/pcgamedb/log" "pcgamedb/log"
"github.com/nitezs/pcgamedb/utils" "pcgamedb/utils"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"go.uber.org/zap" "go.uber.org/zap"

View File

@ -4,8 +4,8 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/log" "pcgamedb/log"
"go.uber.org/zap" "go.uber.org/zap"
"github.com/spf13/cobra" "github.com/spf13/cobra"

View File

@ -3,9 +3,9 @@ package cmd
import ( import (
"strings" "strings"
"github.com/nitezs/pcgamedb/crawler" "pcgamedb/crawler"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/log" "pcgamedb/log"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"go.uber.org/zap" "go.uber.org/zap"

View File

@ -1,8 +1,8 @@
package cmd package cmd
import ( import (
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/log" "pcgamedb/log"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"go.uber.org/zap" "go.uber.org/zap"
) )

View File

@ -1,8 +1,8 @@
package cmd package cmd
import ( import (
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/log" "pcgamedb/log"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"go.uber.org/zap" "go.uber.org/zap"

View File

@ -1,9 +1,9 @@
package cmd package cmd
import ( import (
"github.com/nitezs/pcgamedb/crawler" "pcgamedb/crawler"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/log" "pcgamedb/log"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"go.uber.org/zap" "go.uber.org/zap"

View File

@ -4,9 +4,9 @@ import (
"encoding/json" "encoding/json"
"os" "os"
"github.com/nitezs/pcgamedb/crawler" "pcgamedb/crawler"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/log" "pcgamedb/log"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/bson/primitive"

View File

@ -1,8 +1,8 @@
package cmd package cmd
import ( import (
"github.com/nitezs/pcgamedb/config" "pcgamedb/config"
"github.com/nitezs/pcgamedb/server" "pcgamedb/server"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )

View File

@ -1,8 +1,8 @@
package cmd package cmd
import ( import (
"github.com/nitezs/pcgamedb/crawler" "pcgamedb/crawler"
"github.com/nitezs/pcgamedb/log" "pcgamedb/log"
"go.uber.org/zap" "go.uber.org/zap"
"github.com/spf13/cobra" "github.com/spf13/cobra"

View File

@ -1,8 +1,8 @@
package cmd package cmd
import ( import (
"github.com/nitezs/pcgamedb/log" "pcgamedb/log"
"github.com/nitezs/pcgamedb/task" "pcgamedb/task"
"github.com/robfig/cron/v3" "github.com/robfig/cron/v3"
"github.com/spf13/cobra" "github.com/spf13/cobra"

View File

@ -1,9 +1,9 @@
package cmd package cmd
import ( import (
"github.com/nitezs/pcgamedb/crawler" "pcgamedb/crawler"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/log" "pcgamedb/log"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/bson/primitive"

View File

@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"runtime" "runtime"
"github.com/nitezs/pcgamedb/constant" "pcgamedb/constant"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )

View File

@ -8,10 +8,10 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/nitezs/pcgamedb/constant" "pcgamedb/constant"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
"github.com/nitezs/pcgamedb/utils" "pcgamedb/utils"
"github.com/PuerkitoBio/goquery" "github.com/PuerkitoBio/goquery"
"go.uber.org/zap" "go.uber.org/zap"

View File

@ -11,9 +11,9 @@ import (
"strings" "strings"
"time" "time"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
"github.com/nitezs/pcgamedb/utils" "pcgamedb/utils"
"github.com/jlaffaye/ftp" "github.com/jlaffaye/ftp"
"go.uber.org/zap" "go.uber.org/zap"

View File

@ -7,10 +7,10 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/nitezs/pcgamedb/constant" "pcgamedb/constant"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
"github.com/nitezs/pcgamedb/utils" "pcgamedb/utils"
"github.com/PuerkitoBio/goquery" "github.com/PuerkitoBio/goquery"
"go.uber.org/zap" "go.uber.org/zap"

View File

@ -1,7 +1,7 @@
package crawler package crawler
import ( import (
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
"go.uber.org/zap" "go.uber.org/zap"
) )

View File

@ -4,8 +4,8 @@ import (
"regexp" "regexp"
"strings" "strings"
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
"github.com/nitezs/pcgamedb/utils" "pcgamedb/utils"
"go.uber.org/zap" "go.uber.org/zap"
) )

View File

@ -8,10 +8,10 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/nitezs/pcgamedb/constant" "pcgamedb/constant"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
"github.com/nitezs/pcgamedb/utils" "pcgamedb/utils"
"github.com/PuerkitoBio/goquery" "github.com/PuerkitoBio/goquery"
"go.uber.org/zap" "go.uber.org/zap"

View File

@ -8,11 +8,11 @@ import (
"regexp" "regexp"
"strings" "strings"
"github.com/nitezs/pcgamedb/config" "pcgamedb/config"
"github.com/nitezs/pcgamedb/constant" "pcgamedb/constant"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
"github.com/nitezs/pcgamedb/utils" "pcgamedb/utils"
"github.com/PuerkitoBio/goquery" "github.com/PuerkitoBio/goquery"
"go.uber.org/zap" "go.uber.org/zap"

View File

@ -6,9 +6,9 @@ import (
"strings" "strings"
"time" "time"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
"github.com/nitezs/pcgamedb/utils" "pcgamedb/utils"
"go.uber.org/zap" "go.uber.org/zap"
"go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/bson/primitive"

View File

@ -5,10 +5,10 @@ import (
"regexp" "regexp"
"strings" "strings"
"github.com/nitezs/pcgamedb/constant" "pcgamedb/constant"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
"github.com/nitezs/pcgamedb/utils" "pcgamedb/utils"
"github.com/PuerkitoBio/goquery" "github.com/PuerkitoBio/goquery"
"go.uber.org/zap" "go.uber.org/zap"

View File

@ -6,11 +6,11 @@ import (
"strings" "strings"
"time" "time"
"github.com/nitezs/pcgamedb/config" "pcgamedb/config"
"github.com/nitezs/pcgamedb/constant" "pcgamedb/constant"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
"github.com/nitezs/pcgamedb/utils" "pcgamedb/utils"
"go.uber.org/zap" "go.uber.org/zap"
) )

View File

@ -10,12 +10,12 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/nitezs/pcgamedb/cache" "pcgamedb/cache"
"github.com/nitezs/pcgamedb/config" "pcgamedb/config"
"github.com/nitezs/pcgamedb/constant" "pcgamedb/constant"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
"github.com/nitezs/pcgamedb/utils" "pcgamedb/utils"
) )
var TwitchToken string var TwitchToken string

View File

@ -4,7 +4,7 @@ import (
"regexp" "regexp"
"strings" "strings"
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
"go.uber.org/zap" "go.uber.org/zap"
) )

View File

@ -11,11 +11,11 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/nitezs/pcgamedb/config" "pcgamedb/config"
"github.com/nitezs/pcgamedb/constant" "pcgamedb/constant"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
"github.com/nitezs/pcgamedb/utils" "pcgamedb/utils"
"github.com/PuerkitoBio/goquery" "github.com/PuerkitoBio/goquery"
"go.uber.org/zap" "go.uber.org/zap"

View File

@ -9,12 +9,12 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/nitezs/pcgamedb/cache" "pcgamedb/cache"
"github.com/nitezs/pcgamedb/config" "pcgamedb/config"
"github.com/nitezs/pcgamedb/constant" "pcgamedb/constant"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
"github.com/nitezs/pcgamedb/utils" "pcgamedb/utils"
) )
func _GetSteamID(name string) (int, error) { func _GetSteamID(name string) (int, error) {

View File

@ -8,12 +8,12 @@ import (
"strconv" "strconv"
"time" "time"
"github.com/nitezs/pcgamedb/cache" "pcgamedb/cache"
"github.com/nitezs/pcgamedb/config" "pcgamedb/config"
"github.com/nitezs/pcgamedb/constant" "pcgamedb/constant"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
"github.com/nitezs/pcgamedb/utils" "pcgamedb/utils"
"github.com/PuerkitoBio/goquery" "github.com/PuerkitoBio/goquery"
) )

View File

@ -7,10 +7,10 @@ import (
"regexp" "regexp"
"strings" "strings"
"github.com/nitezs/pcgamedb/constant" "pcgamedb/constant"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
"github.com/nitezs/pcgamedb/utils" "pcgamedb/utils"
"github.com/PuerkitoBio/goquery" "github.com/PuerkitoBio/goquery"
"go.uber.org/zap" "go.uber.org/zap"

View File

@ -8,10 +8,10 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/nitezs/pcgamedb/constant" "pcgamedb/constant"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
"github.com/nitezs/pcgamedb/utils" "pcgamedb/utils"
"github.com/PuerkitoBio/goquery" "github.com/PuerkitoBio/goquery"
"go.uber.org/zap" "go.uber.org/zap"

View File

@ -1,7 +1,7 @@
package db package db
import ( import (
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
) )
func GetDODIGameItems() ([]*model.GameItem, error) { func GetDODIGameItems() ([]*model.GameItem, error) {

View File

@ -1,6 +1,6 @@
package db package db
import "github.com/nitezs/pcgamedb/model" import "pcgamedb/model"
func IsARMGDDNCrawled(flag string) bool { func IsARMGDDNCrawled(flag string) bool {
return IsGameCrawled(flag, "armgddn") return IsGameCrawled(flag, "armgddn")

View File

@ -3,7 +3,7 @@ package db
import ( import (
"context" "context"
"github.com/nitezs/pcgamedb/config" "pcgamedb/config"
"go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options" "go.mongodb.org/mongo-driver/mongo/options"

View File

@ -6,8 +6,8 @@ import (
"sync" "sync"
"time" "time"
"github.com/nitezs/pcgamedb/config" "pcgamedb/config"
"github.com/nitezs/pcgamedb/log" "pcgamedb/log"
"go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo"

View File

@ -5,7 +5,7 @@ import (
"encoding/json" "encoding/json"
"time" "time"
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
"go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/bson"
) )

View File

@ -1,6 +1,6 @@
package db package db
import "github.com/nitezs/pcgamedb/model" import "pcgamedb/model"
func GetFitgirlAllGameItems() ([]*model.GameItem, error) { func GetFitgirlAllGameItems() ([]*model.GameItem, error) {
return GetGameItemsByAuthor("fitgirl") return GetGameItemsByAuthor("fitgirl")

View File

@ -1,7 +1,7 @@
package db package db
import ( import (
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
) )
func GetFreeGOGGameItems() ([]*model.GameItem, error) { func GetFreeGOGGameItems() ([]*model.GameItem, error) {

View File

@ -10,9 +10,9 @@ import (
"strings" "strings"
"time" "time"
"github.com/nitezs/pcgamedb/cache" "pcgamedb/cache"
"github.com/nitezs/pcgamedb/config" "pcgamedb/config"
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
"go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/bson/primitive"

View File

@ -5,7 +5,7 @@ import (
"encoding/json" "encoding/json"
"os" "os"
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
) )
func ImportGameInfo(filePath string) error { func ImportGameInfo(filePath string) error {

View File

@ -1,7 +1,7 @@
package db package db
import ( import (
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
) )
func GetOnlineFixGameItems() ([]*model.GameItem, error) { func GetOnlineFixGameItems() ([]*model.GameItem, error) {

View File

@ -1,7 +1,7 @@
package db package db
import ( import (
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
) )
func GetXatabGameItems() ([]*model.GameItem, error) { func GetXatabGameItems() ([]*model.GameItem, error) {

2
go.mod
View File

@ -1,4 +1,4 @@
module github.com/nitezs/pcgamedb module pcgamedb
go 1.23 go 1.23

View File

@ -4,7 +4,7 @@ import (
"os" "os"
"strings" "strings"
"github.com/nitezs/pcgamedb/config" "pcgamedb/config"
"go.uber.org/zap" "go.uber.org/zap"
"go.uber.org/zap/zapcore" "go.uber.org/zap/zapcore"

View File

@ -3,8 +3,8 @@ package main
import ( import (
"strings" "strings"
"github.com/nitezs/pcgamedb/cmd" "pcgamedb/cmd"
"github.com/nitezs/pcgamedb/log" "pcgamedb/log"
"go.uber.org/zap" "go.uber.org/zap"
) )

View File

@ -3,8 +3,8 @@ package handler
import ( import (
"net/http" "net/http"
"github.com/nitezs/pcgamedb/log" "pcgamedb/log"
"github.com/nitezs/pcgamedb/task" "pcgamedb/task"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )

View File

@ -3,7 +3,7 @@ package handler
import ( import (
"net/http" "net/http"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/bson/primitive"

View File

@ -3,7 +3,7 @@ package handler
import ( import (
"net/http" "net/http"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )

View File

@ -3,8 +3,8 @@ package handler
import ( import (
"net/http" "net/http"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )

View File

@ -3,8 +3,8 @@ package handler
import ( import (
"net/http" "net/http"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/bson/primitive"

View File

@ -3,8 +3,8 @@ package handler
import ( import (
"net/http" "net/http"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo"

View File

@ -3,8 +3,8 @@ package handler
import ( import (
"net/http" "net/http"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/bson/primitive"

View File

@ -3,8 +3,8 @@ package handler
import ( import (
"net/http" "net/http"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo"

View File

@ -3,8 +3,8 @@ package handler
import ( import (
"net/http" "net/http"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )

View File

@ -3,8 +3,8 @@ package handler
import ( import (
"net/http" "net/http"
"github.com/nitezs/pcgamedb/crawler" "pcgamedb/crawler"
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )

View File

@ -3,8 +3,8 @@ package handler
import ( import (
"net/http" "net/http"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )

View File

@ -6,9 +6,9 @@ import (
"runtime" "runtime"
"time" "time"
"github.com/nitezs/pcgamedb/config" "pcgamedb/config"
"github.com/nitezs/pcgamedb/constant" "pcgamedb/constant"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )

View File

@ -3,8 +3,8 @@ package handler
import ( import (
"net/http" "net/http"
"github.com/nitezs/pcgamedb/crawler" "pcgamedb/crawler"
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/bson/primitive"

View File

@ -3,8 +3,8 @@ package handler
import ( import (
"net/http" "net/http"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )

View File

@ -4,9 +4,9 @@ import (
"net/http" "net/http"
"strings" "strings"
"github.com/nitezs/pcgamedb/crawler" "pcgamedb/crawler"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/bson/primitive"

View File

@ -4,7 +4,7 @@ import (
"net/http" "net/http"
"strings" "strings"
"github.com/nitezs/pcgamedb/config" "pcgamedb/config"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )

View File

@ -5,7 +5,7 @@ import (
"strings" "strings"
"time" "time"
"github.com/nitezs/pcgamedb/log" "pcgamedb/log"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"go.uber.org/zap" "go.uber.org/zap"

View File

@ -3,7 +3,7 @@ package middleware
import ( import (
"net/http" "net/http"
"github.com/nitezs/pcgamedb/log" "pcgamedb/log"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"go.uber.org/zap" "go.uber.org/zap"

View File

@ -1,13 +1,13 @@
package server package server
import ( import (
"github.com/nitezs/pcgamedb/server/handler" "pcgamedb/server/handler"
"github.com/nitezs/pcgamedb/server/middleware" "pcgamedb/server/middleware"
"github.com/gin-contrib/cors" "github.com/gin-contrib/cors"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
docs "github.com/nitezs/pcgamedb/docs" docs "pcgamedb/docs"
swaggerfiles "github.com/swaggo/files" swaggerfiles "github.com/swaggo/files"
ginSwagger "github.com/swaggo/gin-swagger" ginSwagger "github.com/swaggo/gin-swagger"

View File

@ -4,12 +4,12 @@ import (
"io" "io"
"time" "time"
"github.com/nitezs/pcgamedb/cache" "pcgamedb/cache"
"github.com/nitezs/pcgamedb/config" "pcgamedb/config"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/log" "pcgamedb/log"
"github.com/nitezs/pcgamedb/server/middleware" "pcgamedb/server/middleware"
"github.com/nitezs/pcgamedb/task" "pcgamedb/task"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/robfig/cron/v3" "github.com/robfig/cron/v3"

View File

@ -1,7 +1,7 @@
package task package task
import ( import (
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"go.uber.org/zap" "go.uber.org/zap"
) )

View File

@ -4,11 +4,11 @@ import (
"net/http" "net/http"
"net/url" "net/url"
"github.com/nitezs/pcgamedb/config" "pcgamedb/config"
"github.com/nitezs/pcgamedb/crawler" "pcgamedb/crawler"
"github.com/nitezs/pcgamedb/db" "pcgamedb/db"
"github.com/nitezs/pcgamedb/model" "pcgamedb/model"
"github.com/nitezs/pcgamedb/utils" "pcgamedb/utils"
"go.uber.org/zap" "go.uber.org/zap"
) )