Skip to content

Fix assignment to nil map#209

Closed
iljarotar wants to merge 1 commit intomasterfrom
nil-map-panic
Closed

Fix assignment to nil map#209
iljarotar wants to merge 1 commit intomasterfrom
nil-map-panic

Conversation

@iljarotar
Copy link

Description

@iljarotar iljarotar requested a review from a team as a code owner February 18, 2026 08:41
defer c.Unlock()

if c.fqdnToEntry == nil {
c.fqdnToEntry = map[string]cacheEntry{}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this gets initialized in the constructor? Why does it happen?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was a false trail. The stack trace was complaining about a different map.

@iljarotar iljarotar closed this Feb 18, 2026
@iljarotar iljarotar deleted the nil-map-panic branch February 18, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants

Comments