- Thread-safe for any value.
go get -u github.com/rafaeljesus/safe
package main
import "github.com/rafaeljesus/safe"
func main() {
data := map[string]interface{}{"key": "value"}
s := New(data)
result, ok := s.Get().(map[string]interface{})
if !ok {
// wrong type
}
// do something
}
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
GitHub @rafaeljesus · Medium @_jesus_rafael · Twitter @_jesus_rafael