2024-11-16 00:48:48 -05:00
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
2024-11-20 06:09:04 -05:00
|
|
|
"pcgamedb/crawler"
|
|
|
|
"pcgamedb/log"
|
2024-11-16 00:48:48 -05:00
|
|
|
"go.uber.org/zap"
|
|
|
|
|
|
|
|
"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)
|
|
|
|
}
|