-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtype.go
More file actions
38 lines (31 loc) · 936 Bytes
/
type.go
File metadata and controls
38 lines (31 loc) · 936 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package main
import (
"sync"
)
type (
// Result contains the scanned path in the kSourceDir that matched the conditions and shall be included in the Final summary of kFilename
Result struct {
Path string `yaml:"path" json:"path"`
Contents []byte `yaml:"contents" json:"contents"`
Size int64 `yaml:"size" json:"size"`
}
// Final contains the rendered Result of the matched path that gets written to kFilename
Final struct {
Path string `yaml:"path" json:"path"`
Contents string `yaml:"contents" json:"contents"`
Size int64 `yaml:"size" json:"size"`
}
// M defines a Message that should be rendered to JSON
M struct {
Message string `json:"message"`
}
// seenStrings captures a concurrent safe map of strings and booleans that indicate whether the string has been seen
seenStrings struct {
mu sync.RWMutex
m map[string]bool
}
mapData struct {
Ext string
Paths []string
}
)