Hacker News new | ask | show | jobs
by secure 2848 days 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
  }