sgo

package
v0.0.0-...-6c909a5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2018 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TranslateDir

func TranslateDir(dirName string) ([]string, []error)

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

func TranslateFile(w func() (io.Writer, error), r io.Reader, filename string) []error

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

func TranslateFilePaths(paths ...string) ([]string, []error)

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

func TranslateFilePathsFrom(whence string, paths ...string) ([]string, []error)

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

func TranslateFiles(files ...NamedFile) ([][]byte, []error)

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

func TranslateFilesFrom(whence string, files ...NamedFile) ([][]byte, []error)

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)

func TranslatePaths

func TranslatePaths(paths []string) (created []string, warnings []error, errs []error)

TranslatePaths translates SGo code from the given import paths. It returns the paths to the created Go files.

For SGo: func(paths []string) (created []string, warnings []error, errs []error)

Types

type NamedFile

type NamedFile struct {
	Path string
	// For SGo: io.Reader
	File io.Reader
}

A NamedFile is a io.Reader for a file with its path.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL