language

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2021 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Golang = Language{
	Name:     "golang",
	Template: defaultGolangTemplate,
	Types:    map[string]string{},
	Funcs: template.FuncMap{
		"Type": typestring,
		"Tag":  tag,
	},
	Formatter: formatGo,
	Importter: genGoImports,
	ExtName:   ".go",
}

Golang represents a golang language

Functions

func RegisterLanguage

func RegisterLanguage(l *Language)

RegisterLanguage registers a language

Types

type Language

type Language struct {
	Name      string
	Template  string
	Types     map[string]string
	Funcs     template.FuncMap
	Formatter func(string) (string, error)
	Importter func([]*schemas.Table) []string
	ExtName   string
}

Language represents a languages supported when reverse codes

func GetLanguage

func GetLanguage(name string, tableName bool) *Language

GetLanguage returns a language if exists

Jump to

Keyboard shortcuts

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