CodeGenerator

command
v0.0.0-...-f8f558a Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

README

��# CodeGenerator

Install
go get "github.com/ivan-kostko/GoLibs/CodeGenerator"

// To define any other location or/and template file extention for templates - use build flags like the following:
go get -ldflags "-X main.templatesMainFolder=YourCustomTemplateLocation -X main.templatesSubFolder=" "github.com/ivan-kostko/GoLibs/CodeGenerator"
Description
The project CodeGenerator represents //go:generate tool to generate _.go files from templates
It uses standard text/template notation.
To prevent template differencies it is loking for templates at get project forlder subfolder (default=CodeGeneratorTemplates) files with predefined extention(default=tmpl)
Example
//go:generate CodeGenerator -pointer -template=container -type=MyType

It will generate in currently active folder file mytype_container.go with package named as current folder name.

Documentation

Overview

Install

go get "github.com/ivan-kostko/GoLibs/CodeGenerator"

// To define any other location or/and template file extention for templates - use build flags like the following:
go get -ldflags "-X main.templatesMainFolder=YourCustomTemplateLocation -X main.templatesSubFolder=" "github.com/ivan-kostko/GoLibs/CodeGenerator"

Description

The project CodeGenerator represents //go:generate tool to generate _.go files from templates
It uses standard text/template notation.
To prevent template differencies it is loking for templates at get project forlder subfolder (default=CodeGeneratorTemplates) files with predefined extention(default=tmpl)

Example

//go:generate CodeGenerator -pointer -template=container -type=MyType

It will generate in currently active folder file mytype_container.go with package named as current folder name.

Jump to

Keyboard shortcuts

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