package format
import "internal/format"
Index ¶
- func Format( fset *token.FileSet, file *ast.File, sourceAdj func(src []byte, indent int) []byte, indentAdj int, src []byte, cfg printer.Config, ) ([]byte, error)
- func IsSpace(b byte) bool
- func Parse(fset *token.FileSet, filename string, src []byte, fragmentOk bool) ( file *ast.File, sourceAdj func(src []byte, indent int) []byte, indentAdj int, err error, )
Functions ¶
func Format ¶
func Format( fset *token.FileSet, file *ast.File, sourceAdj func(src []byte, indent int) []byte, indentAdj int, src []byte, cfg printer.Config, ) ([]byte, error)
Format formats the given package file originally obtained from src and adjusts the result based on the original source via sourceAdj and indentAdj.
func IsSpace ¶
IsSpace reports whether the byte is a space character. IsSpace defines a space as being among the following bytes: ' ', '\t', '\n' and '\r'.
func Parse ¶
func Parse(fset *token.FileSet, filename string, src []byte, fragmentOk bool) ( file *ast.File, sourceAdj func(src []byte, indent int) []byte, indentAdj int, err error, )
Parse parses src, which was read from the named file, as a Go source file, declaration, or statement list.
Source Files ¶
- Version
- v1.5.0-beta.3
- Published
- Jul 30, 2015
- Platform
- js/wasm
- Imports
- 6 packages
- Last checked
- 2 minutes ago –
Tools for package owners.