pcgamedb/cmd/supplement.go
nite07 356a76f5b4 add export cmd
add supplement cmd
rename GameDown to GameItem
2024-11-16 13:48:48 +08:00

26 lines
567 B
Go

package cmd
import (
"github.com/nitezs/pcgamedb/crawler"
"github.com/nitezs/pcgamedb/log"
"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)
}