Skip to content

Commit 3632ce0

Browse files
committed
more golint cleanup
1 parent cb62914 commit 3632ce0

3 files changed

Lines changed: 3 additions & 15 deletions

File tree

event/manager.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@ func Record(file string) error {
2222
return err
2323
}
2424

25-
if err := writeEventFile(sourcePath, gtmPath); err != nil {
26-
return err
27-
}
28-
29-
return nil
25+
return writeEventFile(sourcePath, gtmPath)
3026
}
3127

3228
// Process scans the gtmPath for event files and processes them.

metric/metric.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -248,11 +248,7 @@ func removeMetricFile(gtmPath, fileID string) error {
248248
if _, err := os.Stat(fp); os.IsNotExist(err) {
249249
return nil
250250
}
251-
if err := os.Remove(fp); err != nil {
252-
return err
253-
}
254-
255-
return nil
251+
return os.Remove(fp)
256252
}
257253

258254
// buildCommitMaps creates the write and read-only commit maps.

project/index.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,7 @@ func (i *Index) load() error {
108108
return err
109109
}
110110

111-
if err := json.Unmarshal(raw, &i.Projects); err != nil {
112-
return err
113-
}
114-
115-
return nil
111+
return json.Unmarshal(raw, &i.Projects)
116112
}
117113

118114
func (i *Index) save() error {

0 commit comments

Comments
 (0)