Skip to content
Snippets Groups Projects

Resolve "Improve security by enabling and enforcing more linting rules"

16 files
+ 446
209
Compare changes
  • Side-by-side
  • Inline
Files
16
@@ -15,7 +15,7 @@ const (
var gnmiSubscriptionPaths [][]string
// ReadGnmiSubscriptionPaths reads the paths the watcher should subscribe to provided in a file.
func ReadGnmiSubscriptionPaths() error {
func ReadGnmiSubscriptionPaths() (err error) {
currentDir, err := os.Getwd()
if err != nil {
return err
@@ -28,7 +28,11 @@ func ReadGnmiSubscriptionPaths() error {
return err
}
defer f.Close()
defer func() {
if ferr := f.Close(); ferr != nil {
err = ferr
}
}()
scanner := bufio.NewScanner(f)
Loading