goinspect

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2022 License: MIT Imports: 10 Imported by: 0

README

goinspect

individual inspection command

install

$ go install github.com/podhmo/goinspect/cmd/goinspect@latest

how to use

$ goinspect --pkg ./internal/x/... --only F --include-unexported
package github.com/podhmo/goinspect/internal/x

  func x.F(s x.S)
    func x.log() func()
    func x.F0()
      func x.log() func()
      func x.F1()
        func x.H()
    func x.H()

./internal/x/func.go

inspired by

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dump

func Dump(c *Config, g *Graph, nodes []*Node) error

func DumpAll

func DumpAll(c *Config, g *Graph) error

Types

type Config

type Config struct {
	Fset *token.FileSet

	PkgPath string

	IncludeUnexported bool
	OtherPackages     []string
}

func (*Config) NeedName

func (c *Config) NeedName(name string) bool

type Graph

type Graph = graph.Graph[string, *Subject]

func Scan

func Scan(c *Config, pkgs []*packages.Package) (*Graph, error)

type Node

type Node = graph.Node[*Subject]

type Scanner

type Scanner struct {
	Config *Config
	// contains filtered or unexported fields
}

func (*Scanner) Scan

func (s *Scanner) Scan(pkg *packages.Package, t *ast.File) error

type Subject

type Subject struct {
	ID     string
	Object types.Object
	Recv   string // if method, this value is not zero
}

Directories

Path Synopsis
_examples
cmd
internal
x

Jump to

Keyboard shortcuts

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