Another way to write this code would be:

```go
config, err := exercism.ConfigFromFile(exercism.HomeDir())
if err != nil {  
  if demoDir, err := exercism.DemoDirectory(); err != nil {
     fmt.Println(err)
     return
  }
  config = exercism.Config{
    Hostname: "http://exercism.io",
    ApiKey: "",
    ExercismDirectory: demoDir,
  }
}
```