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