Skip to content
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

Horizontal and Vertical should have type Orientation #543

Closed
241m opened this issue Aug 19, 2022 · 2 comments
Closed

Horizontal and Vertical should have type Orientation #543

241m opened this issue Aug 19, 2022 · 2 comments

Comments

@241m
Copy link
Contributor

241m commented Aug 19, 2022

I was browsing the go docs and found a minor error. It's not a bug or anything (if I'm not mistaken), it's just that Horizontal and Vertical constants doesn't show up under the Orientation type in the reference doc, because they're set as normal ints.

tcell/views/constants.go

Lines 51 to 60 in 896efab

// Orientation represents the direction of a widget or layout.
type Orientation int
const (
// Horizontal indicates left to right orientation.
Horizontal = iota
// Vertical indicates top to bottom orientation.
Vertical
)

@gdamore
Copy link
Owner

gdamore commented Aug 19, 2022

Nice catch. I'll fix it, unless you want to submit a PR?

They should be Orientation types, but I need to make sure that the things that take them also expect Orientation and not int.

@241m
Copy link
Contributor Author

241m commented Aug 20, 2022

Nice catch. I'll fix it, unless you want to submit a PR?

Yup, I can submit PR for this.

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

No branches or pull requests

2 participants