gen

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: BSD-2-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGenerator

func NewGenerator(i Inspector, r Renderer) *gen

func NewInspector

func NewInspector(cfg *config.Options) *inspector

func NewRenderer

func NewRenderer(cfg *config.Options) *renderer

Types

type File

type File struct {
	Header    Header
	Imports   []*Import
	TypeSpecs []*enumer.EnumType
}
type Header struct {
	Package Package
	Module  Module
}

type Import

type Import struct {
	Name string // selector
	Path string
}

type Inspector

type Inspector interface {
	Inspect(pkg *packages.Package) (*File, error)
}

type Module

type Module struct {
	Module       string
	Path         string
	GoModPath    string
	GoModVersion string
	GoVersion    string
}

type Package

type Package struct {
	Name string
	Path string
}

type Renderer

type Renderer interface {
	Render(f *File) ([]byte, error)
}

Jump to

Keyboard shortcuts

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