genutil

package
v0.0.0-...-99c9ca1 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: MIT Imports: 6 Imported by: 3

Documentation

Overview

Package go contains the valyala/quicktemplate based code generation templates for Go used by cdproto-gen.

Index

Constants

View Source
const (
	CommentWidth  = 80
	CommentPrefix = `// `
)

Comment consts.

Variables

View Source
var Keep = map[string]bool{
	"JavaScript": true,
}

Keep are names to maintain exact spelling.

View Source
var KeepUpper = map[string]bool{
	"DOM": true,
	"X":   true,
	"Y":   true,
	"UTC": true,
}

KeepUpper are names to keep in upper case.

Functions

func CleanDesc

func CleanDesc(s string) string

CleanDesc cleans comments / descriptions of "<code>" and "</code>" strings and "`" characters, and fixes common misspellings.

func FormatComment

func FormatComment(s, chop, newstr string) string

FormatComment formats a comment.

func PackageName

func PackageName(d *pdl.Domain) string

PackageName returns the package name to use for a domain.

func Wrap

func Wrap(s string, width int, prefix string) string

Wrap wraps a line of text to the specified width, and adding the prefix to each wrapped line.

Types

This section is empty.

Jump to

Keyboard shortcuts

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