Format Go code on buffer write