mirror of
https://github.com/fumiama/deepinfra.git
synced 2026-06-05 00:32:46 +08:00
21 lines
348 B
Go
21 lines
348 B
Go
package chat
|
|
|
|
import "strings"
|
|
|
|
type item struct {
|
|
isatme bool
|
|
usr, txt string
|
|
}
|
|
|
|
func (item *item) writeToBuilder(sb *strings.Builder, atprefix, namel, namer string) {
|
|
if item.isatme {
|
|
sb.WriteString(atprefix)
|
|
}
|
|
if item.usr != "" {
|
|
sb.WriteString(namel)
|
|
sb.WriteString(item.usr)
|
|
sb.WriteString(namer)
|
|
}
|
|
sb.WriteString(item.txt)
|
|
}
|