mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-03 10:52:33 +08:00
fix:comment out chat.go getLatestVersion
Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
This commit is contained in:
parent
31381935f1
commit
47e77174a2
@ -18,22 +18,18 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
|
"sync"
|
||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
"net/http"
|
|
||||||
"sync"
|
|
||||||
|
|
||||||
"github.com/OpenIMSDK/tools/errs"
|
"github.com/OpenIMSDK/tools/errs"
|
||||||
|
|
||||||
"github.com/OpenIMSDK/tools/mw"
|
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
|
||||||
"github.com/prometheus/client_golang/prometheus/collectors"
|
|
||||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
|
||||||
"google.golang.org/grpc"
|
|
||||||
"google.golang.org/grpc/credentials/insecure"
|
|
||||||
"github.com/OpenIMSDK/tools/log"
|
"github.com/OpenIMSDK/tools/log"
|
||||||
|
"github.com/OpenIMSDK/tools/log"
|
||||||
|
"github.com/OpenIMSDK/tools/mw"
|
||||||
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
|
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
|
||||||
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
|
"github.com/openimsdk/open-im-server/v3/pkg/common/db/cache"
|
||||||
"github.com/openimsdk/open-im-server/v3/pkg/common/db/controller"
|
"github.com/openimsdk/open-im-server/v3/pkg/common/db/controller"
|
||||||
@ -41,6 +37,11 @@ import (
|
|||||||
kdisc "github.com/openimsdk/open-im-server/v3/pkg/common/discoveryregister"
|
kdisc "github.com/openimsdk/open-im-server/v3/pkg/common/discoveryregister"
|
||||||
"github.com/openimsdk/open-im-server/v3/pkg/common/prommetrics"
|
"github.com/openimsdk/open-im-server/v3/pkg/common/prommetrics"
|
||||||
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
|
"github.com/openimsdk/open-im-server/v3/pkg/rpcclient"
|
||||||
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
|
"github.com/prometheus/client_golang/prometheus/collectors"
|
||||||
|
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||||
|
"google.golang.org/grpc"
|
||||||
|
"google.golang.org/grpc/credentials/insecure"
|
||||||
)
|
)
|
||||||
|
|
||||||
type MsgTransfer struct {
|
type MsgTransfer struct {
|
||||||
|
|||||||
@ -17,11 +17,11 @@ package kafka
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"github.com/IBM/sarama"
|
|
||||||
"strings"
|
|
||||||
"github.com/OpenIMSDK/tools/errs"
|
"github.com/OpenIMSDK/tools/errs"
|
||||||
"github.com/OpenIMSDK/tools/log"
|
"github.com/OpenIMSDK/tools/log"
|
||||||
|
|
||||||
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
|
"github.com/openimsdk/open-im-server/v3/pkg/common/config"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
type MConsumerGroup struct {
|
type MConsumerGroup struct {
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
// Copyright © 2023 OpenIM. All rights reserved.
|
// Copyright ? 2023 OpenIM. All rights reserved.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
@ -99,22 +99,23 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// getLatestVersion fetches the latest version number from a given URL.
|
// getLatestVersion fetches the latest version number from a given URL.
|
||||||
func getLatestVersion(url string) (string, error) {
|
// 未使用函数
|
||||||
resp, err := http.Get(url)
|
// func getLatestVersion(url string) (string, error) {
|
||||||
if err != nil {
|
// resp, err := http.Get(url)
|
||||||
return "", err
|
// if err != nil {
|
||||||
}
|
// return "", err
|
||||||
defer resp.Body.Close()
|
// }
|
||||||
|
// defer resp.Body.Close()
|
||||||
|
|
||||||
location := resp.Header.Get("Location")
|
// location := resp.Header.Get("Location")
|
||||||
if location == "" {
|
// if location == "" {
|
||||||
return defaultTemplateVersion, nil
|
// return defaultTemplateVersion, nil
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Extract the version number from the URL
|
// // Extract the version number from the URL
|
||||||
latestVersion := filepath.Base(location)
|
// latestVersion := filepath.Base(location)
|
||||||
return latestVersion, nil
|
// return latestVersion, nil
|
||||||
}
|
// }
|
||||||
|
|
||||||
// downloadAndExtract downloads a file from a URL and extracts it to a destination directory.
|
// downloadAndExtract downloads a file from a URL and extracts it to a destination directory.
|
||||||
func downloadAndExtract(url, destDir string) error {
|
func downloadAndExtract(url, destDir string) error {
|
||||||
@ -164,3 +165,4 @@ func startProcess(cmdPath string) {
|
|||||||
fmt.Printf("Failed to start process %s: %v\n", cmdPath, err)
|
fmt.Printf("Failed to start process %s: %v\n", cmdPath, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user