Skip to content

Commit

Permalink
fix: Initialize new User when inserting into map
Browse files Browse the repository at this point in the history
  • Loading branch information
jstnf committed Apr 29, 2024
1 parent 1f0860a commit 2ea4bb5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions data/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,8 @@ func (s *LocalUserStorage) Init() error {
return err
}
for _, user := range users.Users {
print(user.UserId)
print(user.Name)
s.users[user.UserId] = &user
s.users[user.UserId] = &User{UserId: user.UserId, Name: user.Name}
}
print(s.users)
return nil
}

Expand Down

0 comments on commit 2ea4bb5

Please sign in to comment.