bangsv / my_lib_go

Deprecated io/ioutil package usage GO-C4001
Anti-pattern
Minor
a year agoa year old
ioutil.ReadFile is deprecated, use os.ReadFile instead
17    id := vars["id"]
18    
19    // read the file into memory with ioutil.ReadFile 
20    file, err := ioutil.ReadFile(id)21    
22    // if an error occurs, return a 404 not found response
23    if err != nil {