mirror of
https://github.com/DominicBreuker/pspy.git
synced 2025-12-21 11:44:51 +00:00
add tests and remove unused method in inotify
This commit is contained in:
@@ -130,18 +130,6 @@ func (i *Inotify) NumWatchers() int {
|
||||
return len(i.Watchers)
|
||||
}
|
||||
|
||||
func (i *Inotify) String() string {
|
||||
if len(i.Watchers) < 20 {
|
||||
dirs := make([]string, 0)
|
||||
for _, w := range i.Watchers {
|
||||
dirs = append(dirs, w.Dir)
|
||||
}
|
||||
return fmt.Sprintf("Watching: %v", dirs)
|
||||
} else {
|
||||
return fmt.Sprintf("Watching %d directories", len(i.Watchers))
|
||||
}
|
||||
}
|
||||
|
||||
func getMaxWatchers() (int, error) {
|
||||
b, err := ioutil.ReadFile(maximumWatchersFile)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user