MCPcopy
hub / github.com/BishopFox/jsluice / format

Function format

cmd/jsluice/format.go:7–18  ·  view source on GitHub ↗
(opts options, filename string, source []byte, output chan string, errs chan error)

Source from the content-addressed store, hash-verified

5)
6
7func format(opts options, filename string, source []byte, output chan string, errs chan error) {
8
9 analyzer := jsluice.NewAnalyzer(source)
10
11 formatted, err := analyzer.RootNode().Format()
12 if err != nil {
13 errs <- err
14 return
15 }
16
17 output <- formatted
18}

Callers

nothing calls this directly

Calls 3

RootNodeMethod · 0.95
NewAnalyzerFunction · 0.92
FormatMethod · 0.80

Tested by

no test coverage detected