refactor: deprecate internal/deployer/deployer.getDeployVariables

This commit is contained in:
Fu Diwei
2024-10-31 19:59:21 +08:00
parent 0ceb44a7cd
commit 0d96ea9eef
3 changed files with 34 additions and 24 deletions

View File

@@ -156,28 +156,6 @@ func toStr(tag string, data any) string {
return tag + "" + string(byts)
}
func getDeployVariables(conf domain.DeployConfig) map[string]string {
rs := make(map[string]string)
data, ok := conf.Config["variables"]
if !ok {
return rs
}
bts, _ := json.Marshal(data)
kvData := make([]domain.KV, 0)
if err := json.Unmarshal(bts, &kvData); err != nil {
return rs
}
for _, kv := range kvData {
rs[kv.Key] = kv.Value
}
return rs
}
func convertPEMToPFX(certificate string, privateKey string, password string) ([]byte, error) {
cert, err := x509.ParseCertificateFromPEM(certificate)
if err != nil {