Skip to content

Commit

Permalink
Use os.ReadFile insteal of ioutil.ReadFile
Browse files Browse the repository at this point in the history
  • Loading branch information
Michele Mancioppi committed Sep 14, 2022
1 parent 2b7b751 commit a47260b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions detectors/aws/ecs/ecs.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"context"
"errors"
"fmt"
"io/ioutil"
"net/http"
"os"
"regexp"
Expand Down Expand Up @@ -193,7 +192,7 @@ func (detector *resourceDetector) getLogsAttributes(metadata *ecsmetadata.Contai

// returns docker container ID from default c group path.
func (ecsUtils ecsDetectorUtils) getContainerID() (string, error) {
fileData, err := ioutil.ReadFile(defaultCgroupPath)
fileData, err := os.ReadFile(defaultCgroupPath)
if err != nil {
return "", errCannotReadCGroupFile
}
Expand Down

0 comments on commit a47260b

Please sign in to comment.