runtimeConfigToMap converts a single RuntimeConfig to map[string]any
(rc *RuntimeConfig)
| 248 | |
| 249 | // runtimeConfigToMap converts a single RuntimeConfig to map[string]any |
| 250 | func runtimeConfigToMap(rc *RuntimeConfig) map[string]any { |
| 251 | m := map[string]any{} |
| 252 | if rc.Version != "" { |
| 253 | m["version"] = rc.Version |
| 254 | } |
| 255 | if rc.If != "" { |
| 256 | m["if"] = rc.If |
| 257 | } |
| 258 | if rc.ActionRepo != "" { |
| 259 | m["action-repo"] = rc.ActionRepo |
| 260 | } |
| 261 | if rc.ActionVersion != "" { |
| 262 | m["action-version"] = rc.ActionVersion |
| 263 | } |
| 264 | if rc.Cooldown != nil { |
| 265 | m["cooldown"] = *rc.Cooldown |
| 266 | } |
| 267 | if rc.RunInstallScripts != nil { |
| 268 | m["run-install-scripts"] = *rc.RunInstallScripts |
| 269 | } |
| 270 | return m |
| 271 | } |
| 272 | |
| 273 | // runtimesConfigToMap converts RuntimesConfig back to map[string]any |
| 274 | func runtimesConfigToMap(config *RuntimesConfig) map[string]any { |
no outgoing calls
no test coverage detected