Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoRecord = errors.New("models: no matching record found")
Functions ¶
This section is empty.
Types ¶
type Snippet ¶
Define a Snippet type to hold the data for an individual snippet. Notice how the fields of the struct correspond to the fields in the database
type SnippetModel ¶
The snippet model will be responsible for interacting with the DB, like inserting, updating, deleting, etc
func (*SnippetModel) Latest ¶
func (m *SnippetModel) Latest() ([]Snippet, error)
Click to show internal directories.
Click to hide internal directories.