3
0
mirror of https://kolaente.dev/konrad/docker-db-backup.git synced 2026-01-10 03:10:08 +01:00

Add dump helpers

This commit is contained in:
kolaente
2021-08-18 21:29:17 +02:00
parent 79f6c5cfad
commit 5ec093fbf6
4 changed files with 128 additions and 1 deletions

14
helper.go Normal file
View File

@@ -0,0 +1,14 @@
package main
import "strings"
func parseEnv(envs []string) map[string]string {
env := make(map[string]string, len(envs))
for _, s := range envs {
parts := strings.SplitN(s, "=", 2)
env[parts[0]] = parts[1]
}
return env
}