1 Star 0 Fork 0

powerpaas/machine

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
action.go 656 Bytes
一键复制 编辑 原始数据 按行查看 历史
Evan Hazlett 提交于 2015-05-12 11:21 . redhat: use docker RPMs for install
package pkgaction
type ServiceAction int
const (
Restart ServiceAction = iota
Start
Stop
Enable
Disable
DaemonReload
)
var serviceActions = []string{
"restart",
"start",
"stop",
"enable",
"disable",
"daemon-reload",
}
func (s ServiceAction) String() string {
if int(s) >= 0 && int(s) < len(serviceActions) {
return serviceActions[s]
}
return ""
}
type PackageAction int
const (
Install PackageAction = iota
Remove
Upgrade
)
var packageActions = []string{
"install",
"remove",
"upgrade",
}
func (s PackageAction) String() string {
if int(s) >= 0 && int(s) < len(packageActions) {
return packageActions[s]
}
return ""
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/powerpaas/machine.git
git@gitee.com:powerpaas/machine.git
powerpaas
machine
machine
v0.4.0-rc2

搜索帮助