Documentation ¶
Index ¶
- func TranslateDir(dirName string) ([]string, []error)
- func TranslateFile(w func() (io.Writer, error), r io.Reader, filename string) []error
- func TranslateFilePaths(paths ...string) ([]string, []error)
- func TranslateFilePathsFrom(whence string, paths ...string) ([]string, []error)
- func TranslateFiles(files ...NamedFile) ([][]byte, []error)
- func TranslateFilesFrom(whence string, files ...NamedFile) ([][]byte, []error)
- func TranslatePaths(paths []string) (created []string, warnings []error, errs []error)
- type NamedFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TranslateDir ¶
TranslateDir translates SGo code from the given directory name. It returns the paths to the created Go files.
For SGo: func(dirName string) ([]string, []error)
func TranslateFile ¶
TranslateFile translates SGo code from the given io.Reader to the io.Writer returned by the first argument.
For SGo: func(w func() (io.Writer \ error), r io.Reader, filename string) []error
func TranslateFilePaths ¶
TranslateFilePaths translates SGo code from the given files. It returns the paths to the created Go files.
For SGo: func(paths ...string) ([]string, []error)
func TranslateFilePathsFrom ¶
TranslateFilePaths translates SGo code from the given files. The optional argument whence is the path to the directory the files are on. It returns the paths to the created Go files.
For SGo: func(whence string, paths ...string) ([]string, []error)
func TranslateFiles ¶
TranslateFiles translates SGo code from the given files. It returns the contents of the generated Go files.
For SGo: func(files ...NamedFile) ([][]byte, []error)
func TranslateFilesFrom ¶
TranslateFileFrom translates SGo code from the given files. The optional argument whence is the path to the directory the files are on. It returns the contents of the generated Go files.
For SGo: func(whence string, files ...NamedFile) ([][]byte, []error)
Types ¶
Directories ¶
Path | Synopsis |
---|---|
Package annotations provides utilities to work with SGo annotation files.
|
Package annotations provides utilities to work with SGo annotation files. |
Package ast declares the types used to represent syntax trees for Go packages.
|
Package ast declares the types used to represent syntax trees for Go packages. |
Package constant implements Values representing untyped Go constants and their corresponding operations.
|
Package constant implements Values representing untyped Go constants and their corresponding operations. |
Package doc extracts source code documentation from a Go AST.
|
Package doc extracts source code documentation from a Go AST. |
Package format implements standard formatting of Go source.
|
Package format implements standard formatting of Go source. |
Package importer provides access to export data importers.
|
Package importer provides access to export data importers. |
Package importpaths exposes part of the functionality in the go tool for referring to import paths, typically from the command line arguments.
|
Package importpaths exposes part of the functionality in the go tool for referring to import paths, typically from the command line arguments. |
internal
|
|
testenv
Package testenv provides information about what functionality is available in different testing environments run by the Go team.
|
Package testenv provides information about what functionality is available in different testing environments run by the Go team. |
Package parser implements a parser for Go source files.
|
Package parser implements a parser for Go source files. |
Package printer implements printing of AST nodes.
|
Package printer implements printing of AST nodes. |
Package scanner implements a scanner for Go source text.
|
Package scanner implements a scanner for Go source text. |
Package token defines constants representing the lexical tokens of the Go programming language and basic operations on tokens (printing, predicates).
|
Package token defines constants representing the lexical tokens of the Go programming language and basic operations on tokens (printing, predicates). |
Package types declares the data types and implements the algorithms for type-checking of Go packages.
|
Package types declares the data types and implements the algorithms for type-checking of Go packages. |