We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
老兄,这工具挺不错的。在使用中遇到这2个问题。
func (d *Nacos) GetNameSpace() { if d.DefaultNamespace != "" { //fmt.Println(d.DefaultNamespace) arrNamespace := make([]NamespaceServer, 0) arrNamespace = append(arrNamespace, NamespaceServer{ Namespace: d.DefaultNamespace, NamespaceShowName: d.DefaultSpaceNamd, ConfigCount: 500, }) d.Namespaces = &Namespaces{ Code: 200, // Message: types.Nil{}, Data: arrNamespace, } } else { _url := fmt.Sprintf("%s/nacos/v1/console/namespaces", d.DefaultUlr) res := d.HttpReq(_url) err := json.Unmarshal(res, &d.Namespaces) if err != nil { fmt.Println("获取命名空间json异常") } } fmt.Println(len(d.Namespaces.Data)) // fmt.Println(cap(d.Namespaces.Data)) for _, v := range d.Namespaces.Data { fmt.Println(fmt.Sprintf("ns:%s ,name=%s ,count: %d,quota=%d, type=%d", v.Namespace, v.NamespaceShowName, v.ConfigCount, v.Quota, v.Type)) } } func (d *Nacos) TableRender() { nacos_server := d.Clusterdata[d.Host] tabletitle := []string{"命名空间", "服务名称", "实例", "健康状态", "主机名", "权重", "PID", "容器"} table := tablewriter.NewWriter(os.Stdout) table.SetHeader(tabletitle) for _, v := range nacos_server.HealthInstance { tabledata := v[0:8] if FIND == "" { table.Append(tabledata) } else { if strings.Contains(FIND, ",") { array2 := strings.Split(FIND, ",") for _, v2 := range array2 { if strings.Contains(v[0], v2) { table.Append(tabledata) } if strings.Contains(v[1], v2) { table.Append(tabledata) } if strings.Contains(v[2], v2) { table.Append(tabledata) } } } else { if strings.Contains(v[0], FIND) { table.Append(tabledata) } if strings.Contains(v[1], FIND) { table.Append(tabledata) } if strings.Contains(v[2], FIND) { table.Append(tabledata) } } } }
The text was updated successfully, but these errors were encountered:
感谢大佬指点反馈,最新代码已实现上述功能
Sorry, something went wrong.
老兄的动作真快,点赞
No branches or pull requests
老兄,这工具挺不错的。在使用中遇到这2个问题。
./nacos_check web --url http://10.0.5.157:8848 -f service,domain,gateway
如: ./nacos_check web --url http://10.0.5.157:8848 -a "3b19f3ca-6f5f-4d96-b7ff-a9116fa06f63" -b “DEMO环境”
The text was updated successfully, but these errors were encountered: