Skip to content

matryer/codeform

Repository files navigation

codeform Build Status Go Report Card

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).

About

Easy Go code generation using templates

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages