8// File record to track when files were read/written
9type fileRecord struct {
16 fileRecords = make(map[string]fileRecord)
17 fileRecordMutex sync.RWMutex
20func recordFileRead(path string) {
21 fileRecordMutex.Lock()
22 defer fileRecordMutex.Unlock()
24 record, exists := fileRecords[path]
26 record = fileRecord{path: path}
28 record.readTime = time.Now()
29 fileRecords[path] = record
32func getLastReadTime(path string) time.Time {
33 fileRecordMutex.RLock()
34 defer fileRecordMutex.RUnlock()
36 record, exists := fileRecords[path]
40 return record.readTime
43func recordFileWrite(path string) {
44 fileRecordMutex.Lock()
45 defer fileRecordMutex.Unlock()
47 record, exists := fileRecords[path]
49 record = fileRecord{path: path}
51 record.writeTime = time.Now()
52 fileRecords[path] = record
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list