fix: publish

This commit is contained in:
Rogee
2024-09-04 13:29:15 +08:00
parent 3f6656d97e
commit d7c9d40e37
5 changed files with 29 additions and 7 deletions

View File

@@ -2,8 +2,10 @@ package internal
import (
"context"
"fmt"
"time"
"exporter/config"
"exporter/database/telegram_resource/public/model"
"exporter/database/telegram_resource/public/table"
"exporter/pkg/errorx"
@@ -17,7 +19,12 @@ func WatchCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "watch",
Short: "watch channels",
RunE: wrapE(watchCmd),
PreRunE: func(cmd *cobra.Command, args []string) error {
fmt.Println("init client")
defer fmt.Println("init client done")
return InitClient(config.C)
},
RunE: wrapE(watchCmd),
}
return cmd