Last active
October 4, 2021 14:11
-
-
Save ryanc414/49db4af1bb19fb59b432dceab1fddef8 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 MyLongTypeName struct{ | |
... | |
} | |
func foo(x int, y string) (MyLongTypeName, error) { | |
if x == 42 { | |
return MyLongTypeName{}, errors.New("x cannot be the meaning of life") | |
} | |
if y == "" { | |
return MyLongTypeName{}, errors.New("y cannot be empty") | |
} | |
return MyLongTypeName{...}, nil | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment