GetEnvOrDefault retorna o valor da variável de ambiente ou um valor padrão se não estiver definida
(key, defaultValue string)
| 21 | |
| 22 | // GetEnvOrDefault retorna o valor da variável de ambiente ou um valor padrão se não estiver definida |
| 23 | func GetEnvOrDefault(key, defaultValue string) string { |
| 24 | value := os.Getenv(key) |
| 25 | if value == "" { |
| 26 | return defaultValue |
| 27 | } |
| 28 | return value |
| 29 | } |
| 30 | |
| 31 | // GetEnvVariablesSanitized retorna variáveis de ambiente com valores sensíveis redigidos. |
| 32 | func GetEnvVariablesSanitized() string { |
no outgoing calls