3 ms·
check returns all non-error return values, so the function would be written as: func ReadFile(path string) (string, error) { b := check ioutil.ReadFile(p
by secure 8y ago
check returns all non-error return values, so the function would be written as:
func ReadFile(path string) (string, error) {
b := check ioutil.ReadFile(path)
return string(b), nil
}