Hacker News new | past | comments | ask | show | jobs | submit login

Go has a two-clause if statement:

  if foo, err := GetDataFromDatabase(); err != nil {
          if foo, err = GetDataFromLocalFileSystem(); err != nil {
                  foo, err = GetDataFromNetworkFilesystem()
          }
  }
  return foo, err



Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: