Skip to content

Commit a9dde65

Browse files
authored
docs: add comment for Release (#5838)
Signed-off-by: blueueueueue <1926373770@qq.com>
1 parent f7bdef5 commit a9dde65

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

pkg/ddc/base/portallocator/random_allocator.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,15 @@ func (r *RandomAllocator) Allocate(port int) error {
5454

5555
}
5656

57+
// Release releases the resource associated with the given index.
58+
// For the RandomAllocator, no actual resource is allocated per index,
59+
// so this method does nothing and always returns a nil error.
60+
//
61+
// Parameters:
62+
// - i: the index of the resource to release (unused).
63+
//
64+
// Returns:
65+
// - error: always nil, indicating success with no action.
5766
func (r *RandomAllocator) Release(i int) error {
5867
// no need to release
5968
return nil

0 commit comments

Comments
 (0)