golang

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindProjectRoot

func FindProjectRoot(abs string) (s string, err error)

func GetModuleRoot

func GetModuleRoot(root string) (s string, err error)

func Imports

func Imports(absSrc string) (imports []string, err error)

Types

type ImportRefs

type ImportRefs struct {
	Import string
	Refs   []string
}

func ListImports

func ListImports(path string) (l []ImportRefs, err error)

func (ImportRefs) String

func (i ImportRefs) String() string

type WatchCache

type WatchCache struct {
	// contains filtered or unexported fields
}

func NewWatchCache

func NewWatchCache(root, moduleName string) *WatchCache

func (*WatchCache) AddDir

func (c *WatchCache) AddDir(dir string) (dirs map[string]any)

func (*WatchCache) AddFile

func (c *WatchCache) AddFile(abs string) (dirs map[string]any)

func (*WatchCache) PopDir

func (c *WatchCache) PopDir(dir string) (dirs map[string]any)

func (*WatchCache) RemoveDir

func (c *WatchCache) RemoveDir(dir string) (dirs map[string]any)

func (*WatchCache) RemoveFile

func (c *WatchCache) RemoveFile(file string) (dirs map[string]any)

func (*WatchCache) UpdateFile

func (c *WatchCache) UpdateFile(abs string) (remove, add map[string]any)

type Watcher

type Watcher struct {
	// contains filtered or unexported fields
}

func NewWatcher

func NewWatcher() *Watcher

func (*Watcher) Run

func (w *Watcher) Run(ctx context.Context, abs string) (c <-chan fsnotify.Event, err error)

Jump to

Keyboard shortcuts

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