(id uint64)
| 31 | } |
| 32 | |
| 33 | func updateCluster(id uint64) error { |
| 34 | c, err := getClient() |
| 35 | if err != nil { |
| 36 | return err |
| 37 | } |
| 38 | |
| 39 | cluster, err := c.GetCluster(id) |
| 40 | if err != nil { |
| 41 | return err |
| 42 | } |
| 43 | |
| 44 | // 修改名称 |
| 45 | _, err = c.NewClusterBuilder().Use(*cluster).Name("cluster-1").Commit() |
| 46 | if err != nil { |
| 47 | return err |
| 48 | } |
| 49 | |
| 50 | fmt.Printf("cluster %d name is updated", id) |
| 51 | return nil |
| 52 | } |
nothing calls this directly
no test coverage detected