Documentation ¶
Index ¶
- func Read(name string) (*[]byte, error)
- func Remove(name string) error
- func Write(subcategory *Subcategory) error
- type Subcategory
- func (pointer *Subcategory) SetAnchor(anchor string) *Subcategory
- func (pointer *Subcategory) SetCategory(category string) *Subcategory
- func (pointer *Subcategory) SetEmoji(emoji *slice.Slice) *Subcategory
- func (pointer *Subcategory) SetHref(href string) *Subcategory
- func (pointer *Subcategory) SetName(name string) *Subcategory
- func (pointer *Subcategory) SetNumber(number int) *Subcategory
- func (pointer *Subcategory) SetPosition(position int) *Subcategory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Write ¶
func Write(subcategory *Subcategory) error
Write stores and Subcategory pointer to the dependencies folder.
Types ¶
type Subcategory ¶
type Subcategory struct { Anchor string `json:"anchor"` Category string `json:"category"` Emoji *slice.Slice `json:"emoji"` Href string `json:"href"` Name string `json:"name"` Number int `json:"number"` Position int `json:"position"` }
func Get ¶
func Get(name string) *Subcategory
Get attempts to open a Subcategory from the emojipedia/subcategories folder, but panics if an error occurs.
func NewSubcategory ¶
func NewSubcategory(anchor, category, href, name string, number, position int, emoji *slice.Slice) *Subcategory
NewSubcategory creates a new Subcategory pointer, requiring all struct features as arguments.
func Open ¶
func Open(name string) (*Subcategory, error)
Open attempts to open a Subcategory from the emojipedia/subcategories folder.
func Parse ¶
func Parse(content *[]byte) (*Subcategory, error)
func (*Subcategory) SetAnchor ¶
func (pointer *Subcategory) SetAnchor(anchor string) *Subcategory
SetAnchor sets the Subcategory.Anchor property.
func (*Subcategory) SetCategory ¶
func (pointer *Subcategory) SetCategory(category string) *Subcategory
SetCategory sets the Subcategory.Category property.
func (*Subcategory) SetEmoji ¶
func (pointer *Subcategory) SetEmoji(emoji *slice.Slice) *Subcategory
SetEmoji sets the Subcategory.Emoji property.
func (*Subcategory) SetHref ¶
func (pointer *Subcategory) SetHref(href string) *Subcategory
SetHref sets the Subcategory.Href property.
func (*Subcategory) SetName ¶
func (pointer *Subcategory) SetName(name string) *Subcategory
SetName sets the Subcategory.Name property.
func (*Subcategory) SetNumber ¶
func (pointer *Subcategory) SetNumber(number int) *Subcategory
SetNumber sets the Subcategory.Number property.
func (*Subcategory) SetPosition ¶
func (pointer *Subcategory) SetPosition(position int) *Subcategory
SetPosition sets the Subcategory.Position property.