gofile

package
v0.0.33 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoFile

type GoFile struct {
	// path to file that was read
	FilePath string
	// name of package
	PackageName string
	// full file contents
	Body string
	// all funcs in file
	Fns []pkgpart.PkgPart
	// var and const declarations
	Vars []pkgpart.PkgPart
	// all imports used in file
	Imports []impt.Impt
	// all things declared with "type"
	TypeSpecs []pkgpart.PkgPart
	// comments that aren't docstrings
	LooseComments []string
	// abstract syntax tree for the package
	Ast *ast.File `json:"-"`
}

func New

func New(filePath string) (GoFile, error)

func (GoFile) String

func (gf GoFile) String() string

Jump to

Keyboard shortcuts

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