Run gofmt

This commit is contained in:
Tulir Asokan 2022-11-13 15:40:10 +02:00
parent 0c1fc00f97
commit f1528143aa
3 changed files with 16 additions and 13 deletions

View File

@ -2,10 +2,10 @@
// in https://github.com/eliukblau/pixterm focused in rendering images // in https://github.com/eliukblau/pixterm focused in rendering images
// to a tcell-based TUI app. // to a tcell-based TUI app.
// //
// ___ _____ ____ // ___ _____ ____
// / _ \/ _/ |/_/ /____ ______ _ // / _ \/ _/ |/_/ /____ ______ _
// / ___// /_> </ __/ -_) __/ ' \ // / ___// /_> </ __/ -_) __/ ' \
// /_/ /___/_/|_|\__/\__/_/ /_/_/_/ // /_/ /___/_/|_|\__/\__/_/ /_/_/_/
// //
// This package is licensed under the Mozilla Public License v2.0. // This package is licensed under the Mozilla Public License v2.0.
package ansimage package ansimage

View File

@ -506,11 +506,12 @@ func (room *Room) updateNameFromNameEvent() {
// updateNameFromMembers updates the room display name based on the members in this room. // updateNameFromMembers updates the room display name based on the members in this room.
// //
// The room name depends on the number of users: // The room name depends on the number of users:
// Less than two users -> "Empty room" //
// Exactly two users -> The display name of the other user. // Less than two users -> "Empty room"
// More than two users -> The display name of one of the other users, followed // Exactly two users -> The display name of the other user.
// by "and X others", where X is the number of users // More than two users -> The display name of one of the other users, followed
// excluding the local user and the named user. // by "and X others", where X is the number of users
// excluding the local user and the named user.
func (room *Room) updateNameFromMembers() { func (room *Room) updateNameFromMembers() {
members := room.GetMembers() members := room.GetMembers()
if len(members) <= 1 { if len(members) <= 1 {

View File

@ -179,12 +179,14 @@ var colorNames = []string{
// names specified in tcell.ColorNames. // names specified in tcell.ColorNames.
// //
// The algorithm to get the color is as follows: // The algorithm to get the color is as follows:
// colorNames[ FNV1(string) % len(colorNames) ] //
// colorNames[ FNV1(string) % len(colorNames) ]
// //
// With the exception of the three special cases: // With the exception of the three special cases:
// --> = green //
// <-- = red // --> = green
// --- = yellow // <-- = red
// --- = yellow
func GetHashColorName(s string) string { func GetHashColorName(s string) string {
switch s { switch s {
case "-->": case "-->":