pkg

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fn

type Fn struct {
	Name    string
	Body    string
	LPos    int
	RPos    int
	Imports []impt.Impt
}

Function

type Pkg

type Pkg struct {
	Name         string
	FilePath     string
	Body         string
	Fns          []Fn
	Imports      []impt.Impt
	StructOrIntf []StructOrIntf
	Ast          *ast.File `json:"-"`
}

Package

func New

func New(filePath string) (*Pkg, error)

func (*Pkg) GetBodyWithoutFns

func (p *Pkg) GetBodyWithoutFns() string

func (*Pkg) GetRemainingBody

func (p *Pkg) GetRemainingBody() (string, error)

func (*Pkg) LoadAst

func (p *Pkg) LoadAst(filePath string) error

func (*Pkg) LoadBody

func (p *Pkg) LoadBody(filePath string) error

func (*Pkg) LoadFns

func (p *Pkg) LoadFns()

func (*Pkg) LoadImports

func (p *Pkg) LoadImports()

func (*Pkg) LoadStructOrIntfs

func (p *Pkg) LoadStructOrIntfs()

func (Pkg) String

func (p Pkg) String() string

func (*Pkg) WriteOutput

func (p *Pkg) WriteOutput() error

type StructOrIntf

type StructOrIntf struct {
	Name string
	Body string
	LPos int
	RPos int
}

Interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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