Created
June 23, 2015 11:26
-
-
Save yoppi/49cf58f21af3fa7f9ead to your computer and use it in GitHub Desktop.
This file contains 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
package main | |
import ( | |
>......."fmt" | |
>.......fakeerror "github.com/yoppi/fakeerror" | |
) | |
func main() { | |
>.......fmt.Printf("fakeerror: %p\n", fakeerror.FakeError) | |
>.......fmt.Printf("fakeerror: %p\n", fakeerror.FakeErrorByFunc()) | |
} |
This file contains 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
package fakeerror | |
import ( | |
>......."errors" | |
) | |
var FakeError = errors.New("fake!") | |
func FakeErrorByFunc() error { | |
>.......return FakeError | |
} |
This file contains 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
> ./error | |
fakeerror: 0x20818a080 | |
fakeerror: 0x20818a080 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment