MCPcopy Create free account
hub / github.com/decomp/decomp / gofmtFile

Function gofmtFile

cmd/go-post/main.go:114–120  ·  view source on GitHub ↗
(f *ast.File)

Source from the content-addressed store, hash-verified

112const parserMode = parser.ParseComments
113
114func gofmtFile(f *ast.File) ([]byte, error) {
115 var buf bytes.Buffer
116 if err := format.Node(&buf, fset, f); err != nil {
117 return nil, err
118 }
119 return buf.Bytes(), nil
120}
121
122func processFile(filename string, useStdin bool) error {
123 var f *os.File

Callers 2

parseFixPrintFunction · 0.85
processFileFunction · 0.85

Calls

no outgoing calls

Tested by 1

parseFixPrintFunction · 0.68