0
str := new(bytes.Buffer) //old code
printer.Fprint(str, c) //old code
str := new(token.FileSet) //new code
printer.Fprint(os.Stdout, str, c) //new code
source += "\t" + str.String() + ";\n"
이 코드에서는 Frint의 인수 requier()를 사용하기 때문에 str의 값을 new (bytes.Buffer)에서 new (token.FileSet)로 변경하려고합니다. ;
func Fprint(output io.Writer, fset *token.FileSet, node interface{}) os.Error //latest ver.
이제 str에는 String() 메서드가 없으므로 str.String()에 stucking됩니다. printer.Fprint()가 변경 되었기 때문에 Go의 최신 버전에서 코드를 업데이트 할 수 없습니다.
어떻게 사용합니까?이전 버전의 printer.Fprint를 수정하는 방법