gen

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package gen contains some internal utilities for code generation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CapFirst

func CapFirst(s string) string

CapFirst capitializes the first letter of a string. This function is undefined for non lowercase english alphabet characters.

func LowerFirst

func LowerFirst(s string) string

LowerFirst lowercases the first letter of a string. This function is undefined for non uppercase english alphabet characters.

func NewPackage

func NewPackage(packageName string) func(template string, filename string, objects []interface{}, imports ...string)

NewPackage is given a packageName and returns a function, which when called generates code for a specific package. Each call of the returned function is used to generate a specific file. Given a template, filename, a list of objects which will each be used to execute the template and some top level imports the file is generated.

Types

This section is empty.

Jump to

Keyboard shortcuts

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