Skip to content

Commit

Permalink
fix: return by value
Browse files Browse the repository at this point in the history
  • Loading branch information
katallaxie committed Jun 17, 2024
1 parent 6c703ad commit 0c64d7f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions adapters/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ type GothUser struct {
}

// TeamBySlug is returning the team with the given ID.
func (u *GothUser) TeamBySlug(slug string) *GothTeam {
func (u *GothUser) TeamBySlug(slug string) GothTeam {
for _, team := range *u.Teams {
if team.Slug == slug {
return &team
return team
}
}

return nil
return GothTeam{}
}

// GothSession is a session for a user.
Expand Down

0 comments on commit 0c64d7f

Please sign in to comment.