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

Consistency with widths: int vs uint #32

Open
meowgorithm opened this issue Dec 14, 2020 · 0 comments
Open

Consistency with widths: int vs uint #32

meowgorithm opened this issue Dec 14, 2020 · 0 comments

Comments

@meowgorithm
Copy link
Contributor

I've noticed, while using various parts Reflow together, that most packages int to describe widths, while the newer truncate package uses uint. For example:

// In the ansi sub-package
func PrintableRuneWidth(s string) int

// In the truncate sub-package
func String(s string, width uint) string

Why not standardize on or the other? If not breaking the API is a concern, then it would be safer to stay with int as the truncate package is still unreleased.

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

1 participant