mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-27 05:49:04 +01:00
Fix vet issue
This commit is contained in:
parent
8856f26fb0
commit
882dc011b9
@ -57,15 +57,13 @@ func (fsa *FsArchive) Init(rawConfig json.RawMessage) error {
|
|||||||
|
|
||||||
var config FsArchiveConfig
|
var config FsArchiveConfig
|
||||||
if err := json.Unmarshal(rawConfig, &config); err != nil {
|
if err := json.Unmarshal(rawConfig, &config); err != nil {
|
||||||
fmt.Errorf("fsBackend Init()- %w", err)
|
return fmt.Errorf("fsBackend Init()- %w", err)
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
fsa.path = config.Path
|
fsa.path = config.Path
|
||||||
|
|
||||||
entries, err := os.ReadDir(fsa.path)
|
entries, err := os.ReadDir(fsa.path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Errorf("fsBackend Init()- Cannot read dir %s: %w", fsa.path, err)
|
return fmt.Errorf("fsBackend Init()- Cannot read dir %s: %w", fsa.path, err)
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, de := range entries {
|
for _, de := range entries {
|
||||||
|
Loading…
Reference in New Issue
Block a user