-- import "github.com/ckaznocha/symbol"
A Go implementation of JavaScript style symbols (atoms).
For more info see the example files and the GoDoc page.
func KeyFor(sym Symbol) (string, bool)
KeyFor retrieves a shared symbol key from the global symbol registry for the given symbol. Returns the key and true if found, otherwise an empty string and false.
type Symbol struct {}
A Symbol is a unique and immutable data type.
func For(key string) Symbol
For searches for existing symbols in a runtime-wide symbol registry with the given key and returns it if found. Otherwise a new symbol gets created in the global symbol registry with this key.
func New(description string) Symbol
New creates a new unique symbol. Description is a string which is useful for debugging but not to access the symbol itself.
func (s Symbol) String() string
String method returns a string representing the specified Symbol.
See the CONTRIBUTING
file.
See LICENSE
file