modutils

package
v0.0.0-...-9e23852 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TraverseModules

func TraverseModules(module Module, path []string, cb func(p Module, path []string) error) (err error)

Types

type File

type File struct {
	Name    string
	Content []byte
}

type Generator

type Generator = func(*parser.Parser) *Package

type Module

type Module interface {
	Name() string
	Generate() *Package
	Deps() []Module
}

type Package

type Package struct {
	Name  string
	Files []File
}

func NewPackage

func NewPackage(name, fileName, fileContent string) *Package

type StandartModule

type StandartModule struct {
	Parser *parser.Parser
	// contains filtered or unexported fields
}

func NewStandartModule

func NewStandartModule(name string, gen Generator, p *parser.Parser, deps []Module) *StandartModule

func (StandartModule) Deps

func (module StandartModule) Deps() []Module

func (StandartModule) Generate

func (module StandartModule) Generate() (pkg *Package)

func (StandartModule) Name

func (module StandartModule) Name() string

Jump to

Keyboard shortcuts

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