package printer
import "github.com/google/gnostic/printer"
Package printer provides support for writing generated code.
Index ¶
Types ¶
type Code ¶
type Code struct {
// contains filtered or unexported fields
}
Code represents a file of code to be printed.
func (*Code) Indent ¶
func (c *Code) Indent()
Indent adds one level of indentation.
func (*Code) Outdent ¶
func (c *Code) Outdent()
Outdent remvoes one level of indentation.
func (*Code) Print ¶
func (c *Code) Print(args ...interface{})
Print adds a line of code using the current indentation. Accepts printf-style format strings and arguments.
func (*Code) String ¶
String returns the accumulated code as a string.
Source Files ¶
- Version
- v0.2.2
- Published
- May 19, 2018
- Platform
- js/wasm
- Imports
- 1 packages
- Last checked
- 2 hours ago –
Tools for package owners.