()
| 248 | } |
| 249 | |
| 250 | func Res() { |
| 251 | if len(result.ResultJs) == 0 && len(result.ResultUrl) == 0 { |
| 252 | fmt.Println("未获取到数据") |
| 253 | return |
| 254 | } |
| 255 | //打印还是输出 |
| 256 | if len(cmd.O) > 0 { |
| 257 | if strings.HasSuffix(cmd.O, ".json") { |
| 258 | result.OutFileJson(cmd.O) |
| 259 | } else if strings.HasSuffix(cmd.O, ".html") { |
| 260 | result.OutFileHtml(cmd.O) |
| 261 | } else if strings.HasSuffix(cmd.O, ".csv") { |
| 262 | result.OutFileCsv(cmd.O) |
| 263 | } else { |
| 264 | result.OutFileJson("") |
| 265 | result.OutFileCsv("") |
| 266 | result.OutFileHtml("") |
| 267 | } |
| 268 | } else { |
| 269 | UrlToRedirect() |
| 270 | result.Print() |
| 271 | } |
| 272 | } |
| 273 | |
| 274 | func AppendJs(ur string, urltjs string) int { |
| 275 | config.Lock.Lock() |
no test coverage detected