helper

package
v0.0.0-...-7d91a6f Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenGetArguments

func GenGetArguments(keys []MapKey) string

GenGetArguments generates function arguments, which are the real values passed to the function.

func GenGetParams

func GenGetParams(keys []MapKey) string

GenGetParams generates function parameters, which are the names listed in the function's definition.

func GetTypeEmptyValue

func GetTypeEmptyValue(fd protoreflect.FieldDescriptor) string

func KeywordEscape

func KeywordEscape(str string) string

func NeedGenOrderedMap

func NeedGenOrderedMap(md protoreflect.MessageDescriptor) bool

func ParseGoType

func ParseGoType(file *protogen.File, fd protoreflect.FieldDescriptor) string

ParseGoType converts a FieldDescriptor to Go type string.

Types

type MapKey

type MapKey struct {
	Type string
	Name string
}

func AddMapKey

func AddMapKey(file *protogen.File, fd protoreflect.FieldDescriptor, keys []MapKey) []MapKey

Jump to

Keyboard shortcuts

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