genutils

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2020 License: ISC Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateExternType

func GenerateExternType(root string, t Qualer) jen.Code

GenerateExternType generates a jen.Qual from the given Qualer, except if the path is empty, root is used instead.

func GenerateType

func GenerateType(t Qualer) jen.Code

GenerateType generates a jen.Qual from the given Qualer.

func RecvName

func RecvName(name string) string

RecvName is used to get the receiver variable name. It returns the first letter lower-cased. It does NOT do length checking. It only works with ASCII.

Types

type Qualer

type Qualer interface {
	Qual() (path, name string)
}

Jump to

Keyboard shortcuts

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