diff --git a/detectors/aws/ecs/ecs.go b/detectors/aws/ecs/ecs.go index 9c9ae9f369d..2e8454cf5e9 100644 --- a/detectors/aws/ecs/ecs.go +++ b/detectors/aws/ecs/ecs.go @@ -18,7 +18,6 @@ import ( "context" "errors" "fmt" - "io/ioutil" "net/http" "os" "regexp" @@ -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 }