本文整理匯總了Golang中github.com/ContainX/depcon/compose.Compose類的典型用法代碼示例。如果您正苦於以下問題:Golang Compose類的具體用法?Golang Compose怎麽用?Golang Compose使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了Compose類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: port
func port(c compose.Compose, cmd *cobra.Command, args []string) error {
if len(args) != 2 {
return PortInvalidArgs
}
index, _ := cmd.Flags().GetInt(INDEX_FLAG)
proto, _ := cmd.Flags().GetString(PROTO_FLAG)
return c.Port(index, proto, args[0], args[1])
}
示例2: up
func up(c compose.Compose, cmd *cobra.Command, args []string) error {
return c.Up(args...)
}
示例3: kill
func kill(c compose.Compose, cmd *cobra.Command, args []string) error {
return c.Kill(args...)
}
示例4: start
func start(c compose.Compose, cmd *cobra.Command, args []string) error {
return c.Start(args...)
}
示例5: ps
func ps(c compose.Compose, cmd *cobra.Command, args []string) error {
q, _ := cmd.Flags().GetBool(QUIET_FLAG)
return c.PS(q)
}
示例6: delete
func delete(c compose.Compose, cmd *cobra.Command, args []string) error {
return c.Delete(args...)
}
示例7: build
func build(c compose.Compose, cmd *cobra.Command, args []string) error {
return c.Build(args...)
}
示例8: logs
func logs(c compose.Compose, cmd *cobra.Command, args []string) error {
return c.Logs(args...)
}