本文整理匯總了Golang中github.com/aws/aws-sdk-go/service/devicefarm.DeviceFarm.ListRuns方法的典型用法代碼示例。如果您正苦於以下問題:Golang DeviceFarm.ListRuns方法的具體用法?Golang DeviceFarm.ListRuns怎麽用?Golang DeviceFarm.ListRuns使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/aws/aws-sdk-go/service/devicefarm.DeviceFarm
的用法示例。
在下文中一共展示了DeviceFarm.ListRuns方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: listRuns
/* List all runs */
func listRuns(svc *devicefarm.DeviceFarm, projectArn string) {
listReq := &devicefarm.ListRunsInput{
ARN: aws.String(projectArn),
}
resp, err := svc.ListRuns(listReq)
failOnErr(err, "error listing runs")
fmt.Println(awsutil.Prettify(resp))
}
示例2: listRuns
/* List all runs */
func listRuns(svc *devicefarm.DeviceFarm, projectArn string) {
listReq := &devicefarm.ListRunsInput{
Arn: aws.String(projectArn),
}
resp, err := svc.ListRuns(listReq)
failOnErr(err, "error listing runs")
//fmt.Println(awsutil.Prettify(resp))
table := tablewriter.NewWriter(os.Stdout)
table.SetHeader([]string{"Name", "Platform", "Type", "Result", "Status", "Date", "Arn"})
table.SetAlignment(tablewriter.ALIGN_LEFT)
table.SetColWidth(50)
for _, m := range resp.Runs {
line := []string{*m.Name, *m.Platform, *m.Type, *m.Result, *m.Status, time.Time.String(*m.Created), *m.Arn}
table.Append(line)
}
table.Render() // Send output
}