refactor: clean code

This commit is contained in:
Fu Diwei
2024-10-31 11:37:16 +08:00
parent 3c3d4e9109
commit 83264a6946
21 changed files with 31 additions and 51 deletions

View File

@@ -52,7 +52,7 @@ type DeployerOption struct {
type Deployer interface {
Deploy(ctx context.Context) error
GetInfo() []string
GetInfos() []string
GetID() string
}
@@ -156,19 +156,6 @@ func toStr(tag string, data any) string {
return tag + "" + string(byts)
}
func getDeployString(conf domain.DeployConfig, key string) string {
if _, ok := conf.Config[key]; !ok {
return ""
}
val, ok := conf.Config[key].(string)
if !ok {
return ""
}
return val
}
func getDeployVariables(conf domain.DeployConfig) map[string]string {
rs := make(map[string]string)
data, ok := conf.Config["variables"]