Skip to content

Commit 348085b

Browse files
author
John Wregglesworth
committed
Fix calls to strings.HasSuffix and strings.HasPrefix
1 parent 20bb408 commit 348085b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/internal.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ type AppConfiguration struct {
4747
}
4848

4949
func (a *App) FixUsername(username string) string {
50-
if !strings.HasSuffix(username, a.userSuffix) {
50+
if !strings.HasSuffix(a.userSuffix, username) {
5151
// Only add a @ if the configured user suffix doesn't already
5252
// start with one.
53-
if strings.HasPrefix("@", a.userSuffix) {
53+
if strings.HasPrefix(a.userSuffix, "@") {
5454
return fmt.Sprintf("%s%s", username, a.userSuffix)
5555
}
5656
return fmt.Sprintf("%s@%s", username, a.userSuffix)

0 commit comments

Comments
 (0)