I am programming in Go and I read a text file in and I replace multiple things on it to translate the code from one language to Go to be able to run. The problem I am having is that when trying to replace things like Println statements I cannot get a parenthesis on the end of the statement without being really specific to the code I am converting. Is there a way to use the code like this?
src = bytes.Replace(src, byte("Insert"), byte("Println(" * ")"), -1)
and have the ability to just put a parenthesis at the end of the line of code?