Documentation ¶
Index ¶
- func Lexicon() (*lexicon.Lexicon, error)
- func Make(document *goquery.Document)
- func Remove() error
- type Emojipedia
- func (pointer *Emojipedia) Add(emoji *emoji.Emoji) *Emojipedia
- func (pointer *Emojipedia) Each(f func(key string, emoji *emoji.Emoji)) *Emojipedia
- func (pointer *Emojipedia) Fetch(key string) *emoji.Emoji
- func (pointer *Emojipedia) Get(key string) (*emoji.Emoji, bool)
- func (pointer *Emojipedia) Has(key string) bool
- func (pointer *Emojipedia) Keys() *slice.Slice
- func (pointer *Emojipedia) Len() int
- func (pointer *Emojipedia) Remove(key string) bool
- func (pointer *Emojipedia) Values() *slice.Slice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Lexicon ¶
Lexicon returns the internal lexicon.Lexicon pointer to be consumed by a shared function.
Types ¶
type Emojipedia ¶
type Emojipedia struct {
// contains filtered or unexported fields
}
Emojipedia is a map-like struct with methods used to perform traversal and retrieval of emoji.Emoji pointers.
func Get ¶
func Get() *Emojipedia
Get attempts to open all Emoji data from the emojipedia/emoji folder, but panics if an error occurs.
func NewEmojipedia ¶
func NewEmojipedia(emoji ...*emoji.Emoji) *Emojipedia
NewEmojipedia creates a new Emojipedia pointer, accepting zero or more emoji.Emoji pointers as arguments.
func Open ¶
func Open() (*Emojipedia, error)
Open attempts to open all Emoji data from the emojipedia/emoji folder.
func (*Emojipedia) Add ¶
func (pointer *Emojipedia) Add(emoji *emoji.Emoji) *Emojipedia
Add method adds one emoji.Emoji to the Emojipedia using the emoji.Emoji.Name as the key reference.
func (*Emojipedia) Each ¶
func (pointer *Emojipedia) Each(f func(key string, emoji *emoji.Emoji)) *Emojipedia
Each method executes a provided function once for each emoji.Emoji pointer.
func (*Emojipedia) Fetch ¶
func (pointer *Emojipedia) Fetch(key string) *emoji.Emoji
Fetch retrieves the emoji.Emoji pointer held by the argument key. Panics if key does not exist.
func (*Emojipedia) Get ¶
func (pointer *Emojipedia) Get(key string) (*emoji.Emoji, bool)
Get returns the emoji.Emoji pointer held by the argument key and a boolean indicating if it was successfully retrieved. Panics if cannot convert to emoji.Emoji pointer.
func (*Emojipedia) Has ¶
func (pointer *Emojipedia) Has(key string) bool
Has method checks that a given key exists in the Emojipedia.
func (*Emojipedia) Keys ¶
func (pointer *Emojipedia) Keys() *slice.Slice
Keys method returns a slice.Slice of a given Emojipedia' own property names, in the same order as we get with a normal loop.
func (*Emojipedia) Len ¶
func (pointer *Emojipedia) Len() int
Len method returns the number of elements in the Emojipedia.
func (*Emojipedia) Remove ¶
func (pointer *Emojipedia) Remove(key string) bool
Remove method removes a entry from the Emojipedia if it exists. Returns a boolean to confirm if it succeeded.
func (*Emojipedia) Values ¶
func (pointer *Emojipedia) Values() *slice.Slice
Values method returns a Slice of a given Emojipedia's own enumerable property values, in the same order as that provided by a for...in loop.