codeform

command module
v0.0.0-...-02fd228 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2017 License: GPL-3.0 Imports: 13 Imported by: 0

README

codeform

Go code generation framework.

Get started

To install Codeform, get it:

go get github.com/matryer/codeform/...

This will install the codeform tool, as well as make the codeform packages available to you.

codeform comamnd line tool

The codeform tool allows you to generate output using Go templates.

-src string
	code source (default ".")
-srcin
	take source from standard in
-template string
	template verbatim
-templatesrc string
	template source
-out string
	output file (defaults to standard out)
	
-timeout duration
	timeout for HTTP requests (default 2s)
-v	verbose logging
-n  suppress final line feed
-version
	print version and exit

-func string
	comma separated list of funcs to include
-interface string
	comma separated list of interfaces to include
-name string
	comma separated list of things to include
-package string
	comma separated list of packages to include
-struct string
	comma separated list of structs to include

Advanced

If you want to generate output using Go code instead of templates, you can import the github.com/matryer/codeform/parser package directly and interact with the model yourself (see Model documentation).

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package editor provides the editor web tool.
Package editor provides the editor web tool.
code
Package defaultsource provides a staple source from which templates may be written.
Package defaultsource provides a staple source from which templates may be written.
examples
internal
version
Package version holds the version number of the codeform project.
Package version holds the version number of the codeform project.
Package model contains the types that describe Go code.
Package model contains the types that describe Go code.
Package parser turns Go code into model.Code.
Package parser turns Go code into model.Code.
Package query provides high-level code querying capabilities.
Package query provides high-level code querying capabilities.
Package render provides utilities for rendering code using templates.
Package render provides utilities for rendering code using templates.
Package source provides a way to refer to source files.
Package source provides a way to refer to source files.
default
Package defaultsource provides a staple source from which templates may be written.
Package defaultsource provides a staple source from which templates may be written.
Package tool does the work of rendering output from templates.
Package tool does the work of rendering output from templates.
tutorial

Jump to

Keyboard shortcuts

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