Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // IgnoreFiles 忽略的文件正则表达式 IgnoreFiles = []string{ `.#(\w+).go`, `.(\w+).go.swp`, `(\w+).go~`, `(\w+).tmp`, } // WatchExts 监视的文件扩展名 WatchExts = []string{".go"} )
Functions ¶
func StringSliceUniq ¶
StringSliceUniq 获取唯一的String Slice TODO: 改进算法
Types ¶
type CollectOption ¶
type CollectOption struct { // 忽略vendor目录 IgnoreVendor bool }
CollectOption 依赖收集配置
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector 依赖收集/更新器
func NewCollector ¶
func NewCollector(pwd string, gofiles []string, option *CollectOption) (*Collector, error)
NewCollector 收集器构造函数
func (*Collector) GetWatchDirs ¶
GetWatchDirs 获取可以被监听的目录
type Pkg ¶
type Pkg struct { // pkg name Name string // pkg import path ImportPath string // pkg absoluted dir Dir string // pkg watchable denpencies Dep map[string]*Pkg // all imports Imports []string // contains filtered or unexported fields }
Pkg 依赖树表示
Click to show internal directories.
Click to hide internal directories.