Skip to content

Conversation

@rodneyosodo
Copy link

This pull request refactors the codebase to replace the deprecated ioutil package with the modern io package functions, while also applying additional code style and formatting improvements. The implementation updates function calls, simplifies goroutine closures, removes obsolete debugging code, and standardizes variable declarations to improve clarity and maintainability.

Related to #962

Copy link
Contributor

@VojtechVitek VojtechVitek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for your contribution.

However, I just merged a similar PR #962, which came first.

Feel free to rebase and submit the other contributions separately. Thanks!

Signed-off-by: Rodney Osodo <[email protected]>
Signed-off-by: Rodney Osodo <[email protected]>
Signed-off-by: Rodney Osodo <[email protected]>
@rodneyosodo
Copy link
Author

@VojtechVitek I have rebased

}
}

func debugPrintTree(parent int, i int, n *node, label byte) bool {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep this code, its handy if we ever need it again

Copy link
Member

@pkieltyka pkieltyka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like a lot of changes just to switch to "io" ..


// We're going to be searching for a wild node next,
// in this case, we need to get the tail
var label = search[0]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change style back as how it was please


// Add child depending on next up segment
switch segTyp {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep the spacing between lines as it is.. I prefer it.. more readable

nMagenta = []byte{'\033', '[', '3', '5', 'm'}
nCyan = []byte{'\033', '[', '3', '6', 'm'}
nWhite = []byte{'\033', '[', '3', '7', 'm'}
nRed = []byte{'\033', '[', '3', '1', 'm'}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im confused

@VojtechVitek
Copy link
Contributor

VojtechVitek commented Feb 16, 2025

Given we merged the "io" changes in #962, I'll close this one.

Let's keep the code style and debugging code intact.

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

Successfully merging this pull request may close these issues.

3 participants