keywords

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Make

func Make(document *goquery.Document)

Make builds Keywords dependencies from HTML scraped from unicode.org.

Types

type Keywords

type Keywords struct {
	// contains filtered or unexported fields
}

Keywords is a map-like struct with methods used to perform traversal and retrieval of slice.Slice pointers.

func Get

func Get() *Keywords

Get attempts to open all Keywords data from the emojipedia/keywords folder, but panics if an error occurs.

func New

func New() *Keywords

New instantiates a new empty Keywords pointer.

func Open

func Open() (*Keywords, error)

Open attempts to open all Category data from the emojipedia/subcategories folder.

func (*Keywords) Add

func (pointer *Keywords) Add(key string, names ...string) *Keywords

Add method adds one or more strings to the struct using the key reference to update or create the associated slice.

func (*Keywords) Assign

func (pointer *Keywords) Assign(key string, slice *slice.Slice) *Keywords

func (*Keywords) Each

func (pointer *Keywords) Each(f func(key string, slice *slice.Slice)) *Keywords

Each method executes a provided function once for each slice.Slice pointer.

func (*Keywords) Fetch

func (pointer *Keywords) Fetch(key string) *slice.Slice

Fetch retrieves the slice.Slice pointer held by the argument key. Panics if key does not exist.

func (*Keywords) Get

func (pointer *Keywords) Get(key string) (*slice.Slice, bool)

Get returns the slice.Slice pointer held by the argument key and a boolean indicating if it was successfully retrieved. Panics if cannot convert to slice.Slice pointer.

func (*Keywords) Has

func (pointer *Keywords) Has(key string) bool

Has method checks that a given key exists in the Keywords.

func (*Keywords) Keys

func (pointer *Keywords) Keys() *slice.Slice

Keys method returns a slice.Slice of a given Keywords' own property names, in the same order as we get with a normal loop.

func (*Keywords) Len

func (pointer *Keywords) Len() int

Len method returns the number of elements in the Keywords.

func (*Keywords) Remove

func (pointer *Keywords) Remove(key string) bool

Remove method removes a entry from the Keywords if it exists. Returns a boolean to confirm if it succeeded.

func (*Keywords) Values

func (pointer *Keywords) Values() *slice.Slice

Values method returns a Slice of a given Keywords'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