pcgamedb/cmd/supplement.go
nite07 434dbb1dc2
All checks were successful
docker / prepare-and-build (push) Successful in 2m37s
release / goreleaser (push) Successful in 24m0s
refactor DeduplicateGameItems
update games.json
2024-11-22 01:30:26 +08:00

26 lines
531 B
Go

package cmd
import (
"go.uber.org/zap"
"pcgamedb/crawler"
"pcgamedb/log"
"github.com/spf13/cobra"
)
var supplementCmd = &cobra.Command{
Use: "supplement",
Long: "Supplement platform id to game info",
Short: "Supplement platform id to game info",
Run: func(cmd *cobra.Command, args []string) {
err := crawler.SupplementPlatformIDToGameInfo(log.Logger)
if err != nil {
log.Logger.Error("Error supplementing platform id to game info", zap.Error(err))
}
},
}
func init() {
RootCmd.AddCommand(supplementCmd)
}