-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Migrate from ioutil
to io
#976
Conversation
There was a problem hiding this 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]>
Signed-off-by: Rodney Osodo <[email protected]>
@VojtechVitek I have rebased |
@@ -444,34 +443,6 @@ func TestTreeFindPattern(t *testing.T) { | |||
} | |||
} | |||
|
|||
func debugPrintTree(parent int, i int, n *node, label byte) bool { |
There was a problem hiding this comment.
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
There was a problem hiding this 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" ..
@@ -148,7 +148,7 @@ func (n *node) InsertRoute(method methodTyp, pattern string, handler http.Handle | |||
|
|||
// We're going to be searching for a wild node next, | |||
// in this case, we need to get the tail | |||
var label = search[0] |
There was a problem hiding this comment.
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
@@ -242,7 +242,6 @@ func (n *node) addChild(child *node, prefix string) *node { | |||
|
|||
// Add child depending on next up segment | |||
switch segTyp { | |||
|
There was a problem hiding this comment.
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'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im confused
Given we merged the "io" changes in #962, I'll close this one. Let's keep the code style and debugging code intact. |
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