util

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: Apache-2.0 Imports: 7 Imported by: 373

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoilerplatePath

func BoilerplatePath() string

BoilerplatePath returns the path to the boilerplate file in code-generator, or "" if the default boilerplate.go.txt file cannot be located.

func CurrentPackage

func CurrentPackage() string

CurrentPackage returns the go package of the current directory, or "" if it cannot be derived from the GOPATH.

func PluralExceptionListToMapOrDie added in v0.18.0

func PluralExceptionListToMapOrDie(pluralExceptions []string) map[string]string

PluralExceptionListToMapOrDie converts the list in "Type:PluralType" to map[string]string. This is used for pluralizer. If the format is wrong, this function will panic.

func Vendorless added in v0.20.0

func Vendorless(p string) string

Vendorless trims vendor prefix from a package path to make it canonical

Types

This section is empty.

Jump to

Keyboard shortcuts

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