(cmd *cobra.Command, args []string)
| 142 | } |
| 143 | |
| 144 | func getTask(cmd *cobra.Command, args []string) { |
| 145 | var lcuuid string |
| 146 | if len(args) != 0 { |
| 147 | lcuuid = args[0] |
| 148 | } |
| 149 | server := common.GetServerInfo(cmd) |
| 150 | url := fmt.Sprintf("http://%s:%d/v1/tasks/%s/", server.IP, server.Port, lcuuid) |
| 151 | resp, err := common.CURLResponseRawJson("GET", url, []common.HTTPOption{common.WithTimeout(common.GetTimeout(cmd))}...) |
| 152 | if err != nil { |
| 153 | fmt.Fprintln(os.Stderr, err) |
| 154 | return |
| 155 | } |
| 156 | common.PrettyPrint(resp.Get("DATA")) |
| 157 | } |
| 158 | |
| 159 | func triggerDomain(cmd *cobra.Command, args []string) { |
| 160 | if len(args) == 0 { |
no test coverage detected