You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
os.Setenv("GREETINGS", "hello")
value:="$GREETINGS $NAME"result, err:=envsubst.String(value)
iferr!=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?
The text was updated successfully, but these errors were encountered:
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.
Is there a way of getting
hello $NAME
as the output?The text was updated successfully, but these errors were encountered: