a8m / a8m/envsubst

Can I get the original value if variable empty

Abierto
#56 3 comentarios 4 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Go
Estrellas
907
Forks
96
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Hi, I need to know if there is a variable in my text that is empty after expanding it. I need those variables not to expand and use the original string.

```golang
os.Setenv("GREETINGS", "hello")
value := "$GREETINGS $NAME"
result, err := envsubst.String(value)
if err != nil {
return "", fmt.Errorf("error expanding environment on '%s': %s", value, err.Error())
}
fmt.Println(result) // The output is: "hello "
```

Is there a way of getting `hello $NAME` as the output?

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.