I would like to edit one line of text from a large plain text file, and want to do this inplace, like Python's fileinput package:
fileinput.input(file, inplace=1)
My current approach is to read the whole file into []string and write them back, and I think this is terribly inefficient. So what is idiomatic way to do this in Golang?
Thanks.