1818 printerMode = printer .UseSpaces | printer .TabIndent
1919)
2020
21- //ParseError indicates generated go source is invalid
21+ // ParseError indicates generated go source is invalid
2222type ParseError struct {
2323 path string
2424 err error
@@ -28,12 +28,12 @@ func (e ParseError) Error() string {
2828 return fmt .Sprintf ("Error parsing %v: %v" , e .path , e .err )
2929}
3030
31- //ErrorHandler is a convenience struct for interpretting generation Errors
31+ // ErrorHandler is a convenience struct for interpretting generation Errors
3232type ErrorHandler struct {
3333 ReturnCode int
3434}
3535
36- //Handle interprets the generation error. Proceeds with setting returnCode, or panics depending on error type
36+ // Handle interprets the generation error. Proceeds with setting returnCode, or panics depending on error type
3737func (h * ErrorHandler ) Handle (err error ) {
3838 switch err := err .(type ) {
3939 case nil :
@@ -64,9 +64,9 @@ func write(filePath string, fset *token.FileSet, f *ast.File) error {
6464 return err
6565}
6666
67- //WriteFile parses the generated code in fileOut and writes the code out to filePath.
68- //Function performs some import clean up and gofmts the code before writing
69- //Returns ParseError if the generated source is invalid but is written to filePath
67+ // WriteFile parses the generated code in fileOut and writes the code out to filePath.
68+ // Function performs some import clean up and gofmts the code before writing
69+ // Returns ParseError if the generated source is invalid but is written to filePath
7070func WriteFile (filePath , fileOut string ) error {
7171 fset := token .NewFileSet ()
7272 f , pErr := parser .ParseFile (fset , "" , fileOut , parser .ParseComments )
0 commit comments