gochan-org / gochan

Documentation of an exported function should start with the function’s name GO-D5001
Documentation
Minor
a month ago10 months old
comment on exported method GetUpload should be of the form "GetUpload ..."
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) {
comment on exported method BoardsString should be of the form "BoardsString ..."
 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 {
comment on exported function GetWordfilters should be of the form "GetWordfilters ..."
 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
comment on exported function GetBoardIDFromDir should be of the form "GetBoardIDFromDir ..."
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))
comment on exported function GetBoardDirFromPostID should be of the form "GetBoardDirFromPostID ..."
 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 (