Last active
August 29, 2015 14:20
-
-
Save ejamesc/da8ede9d7ce0a6597a7c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type Blog struct { | |
| Logger *log.Logger | |
| } | |
| func NewBlog() (*Blog, error) { | |
| var b *Blog | |
| logger := log.New(os.Stdout, "[goblawg] ", 0) | |
| b.Logger = logger | |
| // this explodes with a panic: runtime error: invalid memory address or nil pointer dereference | |
| return b, nil | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment