Skip to content

rafaeljesus/safe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Safe

  • Thread-safe for any value.

Installation

go get -u github.com/rafaeljesus/safe

Usage

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
}

Contributing

  • 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

Badges

Build Status Go Report Card Go Doc


GitHub @rafaeljesus  ·  Medium @_jesus_rafael  ·  Twitter @_jesus_rafael

About

Thread-safe for any value 🔒

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published