Documentation ¶
Index ¶
- func ASTToByteArray(ast *ast.File) ([]byte, error)
- func ASTToFile(ast *ast.File, file string) error
- func ASTToString(ast *ast.File) (string, error)
- func ByteArrayToAST(buf []byte) (*ast.File, error)
- func ByteArrayToFile(content []byte, filepath string) error
- func EnsureDir(dir string) error
- func FileToByteArray(file string) ([]byte, error)
- func FileToString(file string) (string, error)
- func NormalizePath(ptrStr *string) error
- func StringToAST(str string) (*ast.File, error)
- func StringToFile(content, filepath string) error
- func TraceAST(f *ast.File) error
- type Content
- type GoFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ASTToByteArray ¶
ASTToByteArray returns a syntax tree as a byte array
func ASTToString ¶
ASTToString returns a syntax tree as a string
func ByteArrayToAST ¶
ByteArrayToAST composes syntax tree from a byte array content
func ByteArrayToFile ¶
ByteArrayToFile writes a buffer to a file
func FileToByteArray ¶
FileToByteArray reads file content and stores it in a byte array
func FileToString ¶
FileToString reads file content and stores it in a string
func NormalizePath ¶
NormalizePath takes a path and resolves ~ to HOME env value and returns abs path
func StringToAST ¶
StringToAST composes syntax tree from a string
func StringToFile ¶
StringToFile writes a strint to a file
Types ¶
Click to show internal directories.
Click to hide internal directories.