Documentation
¶
Overview ¶
Package sure helps you to use interfaces with more confidence. It returns zero value when the confidence is not so good.
It helps you to code like this:
```
if sure.Bool(value){
//..
}
```
instead of
```
if v,ok := value.(bool); ok {
//...
}
```
With `sure`:
``` var v = sure.Int(anInterface) ```
Without `sure`:
``` var (
v int ok bool
) v, ok = anInterface.(int)
if !ok {
// hndle zero value
}
// use `v` ```
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var PanicWhenWrong = false
PanicWhenWrong - when true it panics when the interface doesn't match with the prefered type. Default is false
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.