emoji

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: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read(name string) (*[]byte, error)

func Remove

func Remove(name string) error

Remove deletes the Emoji data stored in the dependencies folder.

func Write

func Write(emoji *Emoji) error

Write stores and Emoji pointer to the dependencies folder.

Types

type Emoji

type Emoji struct {
	Anchor      string       `json:"anchor"`
	Category    string       `json:"category"`
	Codes       *slice.Slice `json:"codes"`
	Description string       `json:"description"`
	Href        string       `json:"href"`
	Image       string       `json:"img"`
	Keywords    *slice.Slice `json:"keywords"`
	Name        string       `json:"name"`
	Number      int          `json:"number"`
	Position    int          `json:"position"`
	Subcategory string       `json:"subcategory"`
	Unicode     string       `json:"unicode"`
}

Emoji stores the contents about an emoji scraped from the unicode consortium.

func Get

func Get(name string) *Emoji

Get attempts to open a Category from the emojipedia/emoji folder, but panics if an error occurs.

func New

func New() *Emoji

New instantiates a new empty Emoji pointer.

func NewEmoji

func NewEmoji(anchor, category, href, image, name, subcategory, unicode string, number, position int, codes, keywords *slice.Slice) *Emoji

NewEmoji creates a new Emoji pointer, requiring all struct features as arguments.

func Open

func Open(name string) (*Emoji, error)

Open attempts to open a Emoji from the emojipedia/emoji folder.

func Parse

func Parse(content *[]byte) (*Emoji, error)

func (*Emoji) SetAnchor

func (pointer *Emoji) SetAnchor(anchor string) *Emoji

SetAnchor sets the Emoji.Anchor property.

func (*Emoji) SetCategory

func (pointer *Emoji) SetCategory(category string) *Emoji

SetCategory sets the Emoji.Category property.

func (*Emoji) SetCodes

func (pointer *Emoji) SetCodes(codes *slice.Slice) *Emoji

SetCodes sets the Emoji.Codes property.

func (*Emoji) SetDescription

func (pointer *Emoji) SetDescription(description string) *Emoji

SetDescription sets the Emoji.Description property.

func (*Emoji) SetHref

func (pointer *Emoji) SetHref(href string) *Emoji

SetHref sets the Emoji.Href property.

func (*Emoji) SetImage

func (pointer *Emoji) SetImage(image string) *Emoji

SetImage sets the Emoji.Image property.

func (*Emoji) SetKeywords

func (pointer *Emoji) SetKeywords(keywords *slice.Slice) *Emoji

SetKeywords sets the Emoji.Keywords property.

func (*Emoji) SetName

func (pointer *Emoji) SetName(name string) *Emoji

SetName sets the Emoji.Name property.

func (*Emoji) SetNumber

func (pointer *Emoji) SetNumber(number int) *Emoji

SetNumber sets the Emoji.Number property.

func (*Emoji) SetPosition

func (pointer *Emoji) SetPosition(position int) *Emoji

SetPosition sets the Emoji.Position property.

func (*Emoji) SetSubcategory

func (pointer *Emoji) SetSubcategory(subcategory string) *Emoji

SetSubcategory sets the Emoji.Subcategory property.

func (*Emoji) SetUnicode

func (pointer *Emoji) SetUnicode(unicode string) *Emoji

SetUnicode sets the Emoji.Unicode property.

Jump to

Keyboard shortcuts

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