299 return GetPostFromID(opID, true)
300}
301
302// GetPostUpload returns the upload info associated with the file as well as any errors encountered.303// If the file has no uploads, then *Upload is nil. If the file was removed from the post, then Filename
304// and OriginalFilename = "deleted"
305func (p *Post) GetUpload() (*Upload, error) {
79 return boardFilters, nil
80}
81
82// BoardString returns a string representing the boards that this wordfilter applies to, 83// or "*" if the filter should be applied to posts on all boards
84func (wf *Wordfilter) BoardsString() string {
85 if wf.BoardDirs == nil {
36 }, err
37}
38
39// GetWordFilters gets a list of wordfilters from the database and returns an array of them and any errors 40// encountered
41func GetWordfilters() ([]Wordfilter, error) {
42 var wfs []Wordfilter
128 return getBoardBase("WHERE DBPREFIXboards.dir = ?", interfaceSlice(dir))
129}
130
131// GetIDFromDir returns the id of the board with the given dir value132func GetBoardIDFromDir(dir string) (id int, err error) {
133 const query = `SELECT id FROM DBPREFIXboards WHERE dir = ?`
134 err = QueryRowSQL(query, interfaceSlice(dir), interfaceSlice(&id))
86 return dir, err
87}
88
89// GetBoardFromPostID gets the boardURI that a given postid exists on 90func GetBoardDirFromPostID(postID int) (string, error) {
91 const query = `SELECT board.uri FROM DBPREFIXboards as board
92 JOIN (
Doc comments work best as complete sentences, which allow a wide variety of automated presentations. The first sentence should be a one-sentence summary that starts with the name being declared.
If every doc comment begins with the name of the item it describes, you can use the doc subcommand of the go tool and run the output through grep.
See https://golang.org/doc/effective_go.html#commentary for more information on how to write good documentation.
package main
// This function tries to summon a cybernetically enhanced duck
func SummonDucks() {
}
package main
// SummonDucks tries to summon a cybernetically enhanced duck
func SummonDucks() {
}