We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have the following types:
type Address struct { Street string City string Country string Zip int } type Person struct { Name string Age int Address Address }
And I have an array of persons:
persons := []Person{ { Name: "name1", Age: 21, Address: Address{ Street: "street1", City: "city1", Country: "country1", Zip: 0, }, }, { Name: "name2", Age: 22, Address: Address{ Street: "street2", City: "city2", Country: "country2", Zip: 0, }, }, }
And I'm trying to extract the an array of the zips from this persons array using funk.Get, and use the WithAllowZero option:
zips := funk.Get(persons, "Address.Zip", funk.WithAllowZero())
The expected result is [0, 0], but I'm getting nil instead
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have the following types:
And I have an array of persons:
And I'm trying to extract the an array of the zips from this persons array using funk.Get, and use the WithAllowZero option:
The expected result is [0, 0], but I'm getting nil instead
The text was updated successfully, but these errors were encountered: