gapc

package
v0.1.2-beta.2 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatSrc

func FormatSrc(src []byte) ([]byte, error)

func MergeSources

func MergeSources(sources ...[]byte) ([]byte, error)

Types

type Dependency

type Dependency struct {
	Name string
	Type string
}

type Flags

type Flags struct {
	Dir        string
	FuncNames  []string
	FileName   string
	Annotation string
	Group      string
	Separate   bool
	Verbose    bool
	Raw        bool
}

type Generator

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

func NewGenerator

func NewGenerator() *Generator

func (*Generator) CmdLine

func (g *Generator) CmdLine() string

func (*Generator) Generate

func (g *Generator) Generate() map[string][]byte

func (*Generator) LoadPackage

func (g *Generator) LoadPackage(patterns ...string) map[string]*packages.Package

func (*Generator) MakeData

func (g *Generator) MakeData(funcName string) any

func (*Generator) ParseFlags

func (g *Generator) ParseFlags()

type TmplData

type TmplData struct {
	CmdLine string
	// Version string
	PackageName    string
	FuncName       string
	PackagePath    string
	Group          string
	Topic          string
	HasRecv        bool
	Dependencies   []Dependency
	DependencyList string
	MsgType        string
	TopicExpr      string
	IsEvent        bool
}

Jump to

Keyboard shortcuts

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