本文整理汇总了Golang中github.com/flynn/flynn/Godeps/_workspace/src/github.com/flynn/go-check.C.Log方法的典型用法代码示例。如果您正苦于以下问题:Golang C.Log方法的具体用法?Golang C.Log怎么用?Golang C.Log使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/flynn/flynn/Godeps/_workspace/src/github.com/flynn/go-check.C
的用法示例。
在下文中一共展示了C.Log方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: deployWithTaffy
func (s *TaffyDeploySuite) deployWithTaffy(t *c.C, app *ct.App, github map[string]string) {
client := s.controllerClient(t)
taffyRelease, err := client.GetAppRelease("taffy")
t.Assert(err, c.IsNil)
rwc, err := client.RunJobAttached("taffy", &ct.NewJob{
ReleaseID: taffyRelease.ID,
ReleaseEnv: true,
Cmd: []string{
app.Name,
github["clone_url"],
github["ref"],
github["sha"],
},
Meta: map[string]string{
"type": "github",
"user_login": github["user_login"],
"repo_name": github["repo_name"],
"ref": github["ref"],
"sha": github["sha"],
"clone_url": github["clone_url"],
"app": app.ID,
},
})
t.Assert(err, c.IsNil)
attachClient := cluster.NewAttachClient(rwc)
var outBuf bytes.Buffer
exit, err := attachClient.Receive(&outBuf, &outBuf)
t.Log(outBuf.String())
t.Assert(exit, c.Equals, 0)
t.Assert(err, c.IsNil)
}
示例2: deployWithTaffy
func (s *TaffyDeploySuite) deployWithTaffy(t *c.C, app *ct.App, env, meta, github map[string]string) {
client := s.controllerClient(t)
taffyRelease, err := client.GetAppRelease("taffy")
t.Assert(err, c.IsNil)
args := []string{
app.Name,
github["clone_url"],
github["branch"],
github["rev"],
}
for name, m := range map[string]map[string]string{"--env": env, "--meta": meta} {
for k, v := range m {
args = append(args, name)
args = append(args, fmt.Sprintf("%s=%s", k, v))
}
}
rwc, err := client.RunJobAttached("taffy", &ct.NewJob{
ReleaseID: taffyRelease.ID,
ReleaseEnv: true,
Cmd: args,
Meta: map[string]string{
"github": "true",
"github_user": github["user"],
"github_repo": github["repo"],
"branch": github["branch"],
"rev": github["rev"],
"clone_url": github["clone_url"],
"app": app.ID,
},
})
t.Assert(err, c.IsNil)
attachClient := cluster.NewAttachClient(rwc)
var outBuf bytes.Buffer
exit, err := attachClient.Receive(&outBuf, &outBuf)
t.Log(outBuf.String())
t.Assert(exit, c.Equals, 0)
t.Assert(err, c.IsNil)
}