Added functionality to implement help.KeyMap interface
So as discussed in #184 this is a first attempt at including this.
I didn´t really know where to put the tests so I made a new file, hope that structure works for you.
The naming, as well as testing / layout etc. is all changeable, just wanted to provide a first look at how this interface could be provided.
Let me know what you think.
I have run
- [x] make fmt
- [x] make lint (it errors on things outside our package??)
- [x] make test
ok github.com/evertras/bubble-table/table 1.110s coverage: 98.3% of statements
Let me know if there is anything I have missed to run.
Also let me know any feedback regarding the implementation.
I adapted the PR to the comments made. Let me know if anything else needs changing :)
Thanks for the updates, just need to fix the page text a bit and then I think we're good to merge!
All help text should be consitent now, I also fixed any Linting issues I found. Let me know if anything else needs fixing :)
Looks like a few more linting errors snuck in.
Ok just fixed the latest ones. Hope that should be all :)
The linter is still angry about the extra newlines. :(
I tried again :D.
I'm unsure what to do, Gitlint locally just checks everything in my local drive not just the directory. I don't know why...
Are you running make lint?
https://github.com/Evertras/bubble-table/actions/runs/11559775491/job/32221732059?pr=185 still has the newline issues.
Yep usiing run/lint sadly still same, see my output underneath.
Others have said it might be cause I don´t have the same Golang version locally as is used in the linter. But not sure. It also does not show the errors the CI/CD makes, which makes it even more confusing Q_Q. I now have I think catched all remaining errors (4).
Is it unhappy with the newline in the comment or the one before the return?
but why then does it complain in other lines that it needs an empty line before a return?
// Good
if something {
return true
}
// Bad
if something {
fmt.Println("Thing")
return
}
Basically, a statement before it versus a {
// Good if something { return true } // Bad if something { fmt.Println("Thing") return }Basically, a statement before it versus a
{
OKay that makes it much more clear. Will correct it and push again :)
Thank you for the patience and fixes!