Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Must ¶
Must panics if err is not nil, otherwise returns t. It is useful for simplifying error handling. Example:
file, err := os.Open("file.txt") if err != nil { panic(err) } defer file.Close() // use file
can be simplified to:
file := sugar.Must(os.Open("file.txt")).(*os.File) defer file.Close() // use file
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.