Skip to content

Commit

Permalink
Fix call to strings.HasPrefix
Browse files Browse the repository at this point in the history
  • Loading branch information
John Wregglesworth committed Jun 13, 2024
1 parent 0f9f8e3 commit 2089d6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func New(client *natscl.Client, db *sqlx.DB, userSuffix string) *App {

func (a *App) FixUsername(username string) (string, error) {
var trimSuffix string
if strings.HasPrefix("@", a.userSuffix) {
if strings.HasPrefix(a.userSuffix, "@") {
trimSuffix = a.userSuffix
} else {
trimSuffix = fmt.Sprintf("@%s", a.userSuffix)
Expand Down

0 comments on commit 2089d6c

Please sign in to comment.