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

Status codes are out of order #78

Closed
nakabonne opened this issue Oct 19, 2020 · 3 comments
Closed

Status codes are out of order #78

nakabonne opened this issue Oct 19, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@nakabonne
Copy link
Owner

What's happened
When more than one status code (and errors) is reported, the order is not constant and could be replaced at irregular intervals.
order

Cause
Since the map is iterated to build a string.

ali/gui/drawer.go

Lines 217 to 230 in 1329145

// TODO: Guaranteed to be in order.
codesText := ""
for code, n := range m.StatusCodes {
codesText += fmt.Sprintf(`%q: %d
`, code, n)
}
d.widgets.statusCodesText.Write(codesText, text.WriteReplace())
errorsText := ""
for _, e := range m.Errors {
errorsText += fmt.Sprintf(`- %s
`, e)
}
d.widgets.errorsText.Write(errorsText, text.WriteReplace())

@nakabonne nakabonne added the bug Something isn't working label Oct 19, 2020
@nakabonne nakabonne changed the title Status codes are out of order. Status codes are out of order Oct 19, 2020
@shubham14bajpai
Copy link
Contributor

Hi, @nakabonne is this issue being worked on? I would like to take this up.

@nakabonne
Copy link
Owner Author

@shubham14bajpai Sure, I hope you'll work on!

@nakabonne
Copy link
Owner Author

Resolved by #83

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants