// if error is not nil, remember to close connect.
if error is not nil, remember to close connect.
// if error is not nil remember to close connect .
func GetClient() (*grpc.ClientConn, *pb.CrawlServiceClient, error) {
	conn, err := grpc.Dial(
		fmt.Sprintf("%s:%d", viper.GetString("service.crawl_service.host"), viper.GetInt("service.crawl_service.port")),
		grpc.WithInsecure(),
		grpc.WithBlock(),
	)
	if err != nil {
		return conn, nil, err
	}
	client := pb.NewCrawlServiceClient(conn)
	return conn, &client, nil
}
func GetClient ( ) ( * grpc . ClientConn , * pb . CrawlServiceClient , error ) { conn , err := grpc . Dial ( fmt . Sprintf ( " " , viper . GetString ( " " ) , viper . GetInt ( " " ) ) , grpc . WithInsecure ( ) , grpc . WithBlock ( ) , ) if err != nil { return conn , nil , err } client := pb . NewCrawlServiceClient ( conn ) return conn , & client , nil }
if error is not nil, remember to close connect.
if error is not nil remember to close connect .