subcategories

package
v0.0.0-...-3a26ebd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2019 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lexicon

func Lexicon() (*lexicon.Lexicon, error)

func Make

func Make(document *goquery.Document)

func Remove

func Remove() error

Remove deletes all Subcategory data stored in the dependencies folder.

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 New

func New() *Subcategories

New instantiates a new empty Subcategories pointer.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL