Skip to content

Commit

Permalink
Added godoc to hero pool constr
Browse files Browse the repository at this point in the history
  • Loading branch information
Boris Kozlov authored and Boris Kozlov committed Jul 21, 2023
1 parent 342b8b2 commit 4e1f9f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions module/mempool/herocache/backdata/heropool/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ type Pool struct {
ejectionMode EjectionMode
}

// NewHeroPool returns a pointer to a new hero pool constructed based on a provided EjectionMode,
// logger and a provided fixed size.
func NewHeroPool(sizeLimit uint32, ejectionMode EjectionMode, logger zerolog.Logger) *Pool {
l := &Pool{
free: state{
Expand Down
2 changes: 1 addition & 1 deletion module/mempool/herocache/backdata/heropool/pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ func testAddRemoveEntities(t *testing.T, limit uint32, entityCount uint32, eject

randomIntN := func(length int) int {
random, err := rand.Uintn(uint(length))
require.Nil(t, err)
require.NoError(t, err)
return int(random)
}

Expand Down

0 comments on commit 4e1f9f3

Please sign in to comment.