helper

package
v0.0.0-...-2cadf5c Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DeprecationComment = "// Deprecated: Do not use."
)

Variables

This section is empty.

Functions

func Exists

func Exists(path string) bool

func GetFileBaseDir

func GetFileBaseDir(file *protogen.File, config GenerateConfig) string

func ParseGoFile

func ParseGoFile(filepath string) ([]byte, map[string]struct{})

func ToCamelCase

func ToCamelCase(s string) string

func ToSnakeCase

func ToSnakeCase(input string) string

Types

type CodeHeader

type CodeHeader struct {
	// contains filtered or unexported fields
}

func NewCodeHeader

func NewCodeHeader() *CodeHeader

func (*CodeHeader) DoNotEdit

func (h *CodeHeader) DoNotEdit() *CodeHeader

func (*CodeHeader) Import

func (h *CodeHeader) Import(importPath string) *CodeHeader

func (*CodeHeader) ImportWithAlias

func (h *CodeHeader) ImportWithAlias(importPath string, alias string) *CodeHeader

func (*CodeHeader) Pkg

func (h *CodeHeader) Pkg(pkg string) *CodeHeader

func (CodeHeader) String

func (h CodeHeader) String() string

type CodeHeaderTmpl

type CodeHeaderTmpl string

func (CodeHeaderTmpl) String

func (t CodeHeaderTmpl) String(pkg string) string

type GenerateConfig

type GenerateConfig struct {
	Project string
	PbGoDir string
	ModPath string
}

type Importer

type Importer struct {
	// contains filtered or unexported fields
}

func NewImporter

func NewImporter() *Importer

func (*Importer) Import

func (i *Importer) Import(importPath string) *Importer

func (*Importer) ImportWithAlias

func (i *Importer) ImportWithAlias(importPath string, alias string) *Importer

func (*Importer) String

func (i *Importer) String() string

type TmplRenderer

type TmplRenderer struct {
	// contains filtered or unexported fields
}

func NewTmplRenderer

func NewTmplRenderer(name string) *TmplRenderer

func (*TmplRenderer) Data

func (r *TmplRenderer) Data(data interface{}) *TmplRenderer

func (*TmplRenderer) RenderTmpl

func (r *TmplRenderer) RenderTmpl() string

func (*TmplRenderer) Text

func (r *TmplRenderer) Text(text string) *TmplRenderer

Jump to

Keyboard shortcuts

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