go fmt
This commit is contained in:
parent
3e56339c71
commit
ac3681edb1
@ -12,11 +12,11 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type AppSettings struct {
|
type AppSettings struct {
|
||||||
VersionMode bool
|
VersionMode bool
|
||||||
MetricsPort int
|
MetricsPort int
|
||||||
Fail2BanDbPath string
|
Fail2BanDbPath string
|
||||||
Fail2BanSocketPath string
|
Fail2BanSocketPath string
|
||||||
FileCollectorPath string
|
FileCollectorPath string
|
||||||
FileCollectorEnabled bool
|
FileCollectorEnabled bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,14 +6,14 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Collector struct {
|
type Collector struct {
|
||||||
enabled bool
|
enabled bool
|
||||||
folderPath string
|
folderPath string
|
||||||
fileMap map[string]*fileData
|
fileMap map[string]*fileData
|
||||||
}
|
}
|
||||||
|
|
||||||
type fileData struct {
|
type fileData struct {
|
||||||
readErrors int
|
readErrors int
|
||||||
fileName string
|
fileName string
|
||||||
fileContents []byte
|
fileContents []byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,8 +31,8 @@ func (c *Collector) collectFileContents() {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
c.fileMap[fileName] = &fileData{
|
c.fileMap[fileName] = &fileData{
|
||||||
readErrors: 0,
|
readErrors: 0,
|
||||||
fileName: fileName,
|
fileName: fileName,
|
||||||
}
|
}
|
||||||
|
|
||||||
fullPath := filepath.Join(c.folderPath, file.Name())
|
fullPath := filepath.Join(c.folderPath, file.Name())
|
||||||
|
@ -18,4 +18,3 @@ func (c *Collector) WriteTextFileMetrics(w http.ResponseWriter, r *http.Request)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user