Documentation ¶
Overview ¶
Package tags contains structures, methods, and functions for manipulting tags within the goblog application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TagEntries ¶
TagEntries is a map of TagEntry structures with some methods for easily adding blog entries. It also has the ability to export the entries as a list for further processing.
func ParseBlogs ¶
func ParseBlogs(entries []*blogs.BlogEntry) TagEntries
ParseBlogs builds a TagEntries from the given list of blogs.
func (TagEntries) Add ¶
func (te TagEntries) Add(e *blogs.BlogEntry)
Add links the given BlogEntry to all of it's tags.
func (TagEntries) Slice ¶
func (te TagEntries) Slice() TagEntriesSlice
Slice returns the TagEntry structures with this TagEntries as a slice. The list is in sorted order.
type TagEntriesSlice ¶
type TagEntriesSlice []*TagEntry
TagEntriesSlice is a slice of TagEntry structures this is returns by the Slice() function for TagEntries. It implements the sorting interface for golangs sort package.
func (TagEntriesSlice) Len ¶
func (tes TagEntriesSlice) Len() int
Len returns the length of the TagEntriesSlice.
func (TagEntriesSlice) Less ¶
func (tes TagEntriesSlice) Less(i, j int) bool
Less returns true if the value at i is less than the value at j.
func (TagEntriesSlice) Swap ¶
func (tes TagEntriesSlice) Swap(i, j int)
Swap switches the elemens at i and j.