-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
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
Panic on v2
branch but not master
#24
Comments
Hi @grokify , thanks for your reporting!
If you have a simple code which get panic, it would be very helpful. Thank you. |
Hi, For the record, I followed a tutorial to properly get the credentials json (https://www.youtube.com/watch?v=cnPlKLEGR7E) and the sheet is not shared publicly. |
To be more precise, the error is as follows :
|
And a last point, I use Go modules (go.mod) which is the recommended practice currently. |
OK I believe the issue is due to the package name "spreadsheet" conflicting with the variable name in the example.
Indeed the example (Code example for Iwark/spreadsheet v2) begins to use the package name line 19 :
but then redefines the identifier
For whatever reason it has an impact when using "gopkg.in/Iwark/spreadsheet.v2", whereas there is no impact when using "github.com/Iwark/spreadsheet". In the end of the day the issue vanishes as soon as I change the variable name line 20. |
When I import
gopkg.in/Iwark/spreadsheet.v2
I get the following panic onservice.ExpandSheet(...)
andsheet.Synchronize()
:panic: runtime error: invalid memory address or nil pointer dereference
Everything works fine when I import
github.com/Iwark/spreadsheet
Also wanted to say this has a very nice interface. I have it running nicely already!
The text was updated successfully, but these errors were encountered: