hooks

package
v0.0.0-...-6e85089 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFileHook

func GetFileHook(lang string) (langhook.FileHook, bool)

GetFileHook gets fileHook by lang name

func RegisterFileHook

func RegisterFileHook(lang string, hook func() langhook.FileHook)

RegisterFileHook register fileHook factory

Types

type GolangFileHook

type GolangFileHook struct{}

GolangFileHook filehook for Golang

func (*GolangFileHook) OnFileClosed

func (golang *GolangFileHook) OnFileClosed(path string) error

OnFileClosed when file is closed

func (*GolangFileHook) OnFileClosing

func (golang *GolangFileHook) OnFileClosing(f *os.File) error

OnFileClosing when file is closing

func (*GolangFileHook) OnFileCreated

func (golang *GolangFileHook) OnFileCreated(f *os.File) error

OnFileCreated when file first created in filesystem (not exist previously)

func (*GolangFileHook) OnFileOpened

func (golang *GolangFileHook) OnFileOpened(f *os.File) error

OnFileOpened when file first opened in program

type TypescriptFileHook

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

TypescriptFileHook filehook for ts

func (*TypescriptFileHook) OnFileClosed

func (ts *TypescriptFileHook) OnFileClosed(path string) error

OnFileClosed when file is closed

func (*TypescriptFileHook) OnFileClosing

func (ts *TypescriptFileHook) OnFileClosing(f *os.File) error

OnFileClosing when file is closing

func (*TypescriptFileHook) OnFileCreated

func (ts *TypescriptFileHook) OnFileCreated(f *os.File) error

OnFileCreated when file first created in filesystem (not exist previously)

func (*TypescriptFileHook) OnFileOpened

func (ts *TypescriptFileHook) OnFileOpened(f *os.File) error

OnFileOpened when file first opened in program

Jump to

Keyboard shortcuts

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