In Ruby, I could directly capture variables in string literals like in bash.
SRCDIR = "aaa"
DSTDIR = "bbb"
puts "SRCDIR = #{SRCDIR}"
puts "DSTDIR = #{DSTDIR}"
This is a simple and tiny feature, but very nice to make it feel like a shell script. If I have to write a complex shell script this helps a lot because this eliminates the need for substitution, concatenation and format expression.
Does Go have something like this? If it does, how to use it?
text/templateif you are looking to produce parameterized text.