fyne-io / fyne

Cross platform GUI toolkit in Go inspired by Material Design
https://fyne.io/
Other
25.17k stars 1.4k forks source link

function never returns a value #2013

Closed tehsphinx closed 3 years ago

tehsphinx commented 3 years ago

Describe the bug:

Function addAttributes in cmd/fyne/internal/mobile/binres/binres.go always returns nil, never the promised attributes xml.

andydotxyz commented 3 years ago

The whole of cmd/fyne/internal/mobile is a repackage of the gomobile tools which we are slowly reworking. How does this bug manifest for users of this code?

tehsphinx commented 3 years ago

no manifestation; just stumbled over it looking through code.

ashish10677 commented 3 years ago

Hi,

I was looking to start my open source contribution. I noticed that the function addAttributes indeed never returns a value. I wanted to fix this issue. Could someone help me get started with it? Should I change the return type to just error and remove the nil wherever it is being returned?

Also, where do I find the test for this file?

Any help or guidance would be really appreciated.

andydotxyz commented 3 years ago

It looks to me like it should just be returning bx, as the signature seems to indicate a passthrough function. However, as I mentioned above, this code was pulled in from a different repo so it's code standards, documentation and testing do not meet our normal levels. I cannot find tests that cover the function, but you would be most welcome to add them (it would be binres_test.go).

andydotxyz commented 3 years ago

Fixed on develop branch