Skip to content

MapTo: error on nil struct pointer instead of panic - #392

Open
team-humaki wants to merge 1 commit into
go-ini:mainfrom
team-humaki:fix-mapto-nil-struct-pointer
Open

team-humaki wants to merge 1 commit into
go-ini:mainfrom
team-humaki:fix-mapto-nil-struct-pointer

Conversation

@team-humaki

Copy link
Copy Markdown

Summary

MapTo(&cfg) when cfg is a nil *T panicked inside mapToField. Return nil pointer to a struct instead (#369).

Test plan

  • go test ./...
  • TestMapToNilStructPointer

Fixes #369

Calling MapTo(&cfg) when cfg is a nil *T used to panic in mapToField.
Return a clear error instead (go-ini#369).

Fixes go-ini#369

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

panic: nil struct pointer to MapTo

1 participant