gosrc

package
v0.0.0-beta Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: Unlicense Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const GoModRegex string = `module\s(.+)\n\ngo\s(\d\.\d\d)`

Variables

This section is empty.

Functions

This section is empty.

Types

type FuncInfo

type FuncInfo struct {
	Name  string
	Pos   PosInfo
	Stmts StmtsInfo
}

func (FuncInfo) NumberOfStatements

func (funcInfo FuncInfo) NumberOfStatements() int

type FuncsInfo

type FuncsInfo []FuncInfo

func AnalyzeSourceFile

func AnalyzeSourceFile(filePath string) (FuncsInfo, error)

func (FuncsInfo) NumberOfStatements

func (funcsInfo FuncsInfo) NumberOfStatements() int

type GoMod

type GoMod struct {
	ModuleName string
	GoVersion  string
}

func GetGoMod

func GetGoMod() (GoMod, error)

type PosInfo

type PosInfo struct {
	PosFrom  int
	PosTo    int
	LineFrom int
	LineTo   int
}

type SourceFileInfo

type SourceFileInfo struct {
	Name      string
	Path      string
	FuncsInfo FuncsInfo
}

func (SourceFileInfo) Directory

func (srcInfo SourceFileInfo) Directory() string

type SourceFilesInfo

type SourceFilesInfo []SourceFileInfo

func GetSourceFiles

func GetSourceFiles() (srcs SourceFilesInfo, err error)

func (SourceFilesInfo) NumberOfStatements

func (srcFilesInfo SourceFilesInfo) NumberOfStatements() int

type StmtInfo

type StmtInfo struct {
	Pos PosInfo
}

type StmtsInfo

type StmtsInfo []StmtInfo

Jump to

Keyboard shortcuts

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