gochan-org / gochan

Non-idiomatic comment formatting GO-C4004
Style
Minor
2 months ago2 years old
put a space between // and comment text
 87	return nil
 88}
 89
 90func getCurrentStaff(request *http.Request) (string, error) { //TODO after refactor, check if still used 91	staff, err := GetStaffFromRequest(request)
 92	if err != nil {
 93		return "", err
put a space between // and comment text
250	// isSticky := request.FormValue("modstickied") == "on"
251	// isLocked := request.FormValue("modlocked") == "on"
252
253	//post has no referrer, or has a referrer from a different domain, probably a spambot254	if !serverutil.ValidReferer(request) {
255		gcutil.LogWarning().
256			Str("spam", "badReferer").
put a space between // and comment text
 52		return section.ID, err
 53	}
 54	if err != nil {
 55		return 0, err //other error 56	}
 57	return id, nil
 58}
put a space between // and comment text
180func (staff *Staff) CreateLoginSession(key string) error {
181	const insertSQL = `INSERT INTO DBPREFIXsessions (staff_id,data,expires) VALUES(?,?,?)`
182	const updateSQL = `UPDATE DBPREFIXstaff SET last_login = CURRENT_TIMESTAMP WHERE id = ?`
183	_, err := ExecSQL(insertSQL, staff.ID, key, time.Now().Add(time.Duration(time.Hour*730))) //TODO move amount of time to config file184	if err != nil {
185		return err
186	}
put a space between // and comment text
70		//None of the nodes directly contain text
71		//truncate children first
72		charactersLeft, linesLeft = truncateHTMLNodes(node.FirstChild, charactersLeft, linesLeft)
73		//Pass values to siblings (sibling code will immediately exit if no more chars allowed, and remove self)74		return truncateHTMLNodes(node.NextSibling, charactersLeft, linesLeft)
75	case x_html.TextNode:
76		if len(node.Data) > charactersLeft {