sunty
2021-07-27 3b2d69dde3ae175bf00981e0d95e7e8cafd5f3a1
Merge branch 'master' of http://192.168.5.5:10010/r/pubsub/esutil
1个文件已添加
2个文件已修改
12 ■■■■■ 已修改文件
.gitignore 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
EsClient.go 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
swfs.go 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.gitignore
New file
@@ -0,0 +1,3 @@
.idea
go.mod
go.sum
EsClient.go
@@ -1104,6 +1104,8 @@
    v := viper.New()
    v.SetConfigType("yaml")
    v.SetConfigName("pro")
    v.AddConfigPath("../config/")
    v.AddConfigPath("./config/")
    v.AddConfigPath("/opt/vasystem/config/")
    err := v.ReadInConfig()
    if err != nil {
swfs.go
@@ -5,7 +5,6 @@
    "bytes"
    "errors"
    "fmt"
    "github.com/golang/glog"
    "io"
    "io/ioutil"
    "net/http"
@@ -60,7 +59,7 @@
    cp := configPath + "/seaweedfs_start.sh"
    file, err := os.OpenFile(cp, os.O_RDWR, 0666)
    if err != nil {
        glog.Error("open config file fail, err: ", err)
        fmt.Println("open config file fail, err: ", err)
        return info, err
    }
    defer file.Close()
@@ -102,7 +101,7 @@
    cp := configPath + "/seaweedfs_start.sh"
    file, err := os.OpenFile(cp, os.O_RDWR, 0666)
    if err != nil {
        glog.Error("open config file fail, err: ", err)
        fmt.Println("open config file fail, err: ", err)
        return false
    }
    defer file.Close()
@@ -131,7 +130,7 @@
    }
    if err := writeToFile(cp, output); err != nil {
        glog.Errorf("write config file err: %v", err)
        fmt.Println("write config file err: ", err)
        return false
    }
    return true