-
Notifications
You must be signed in to change notification settings - Fork 30
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
Refactor using packages #1155
base: master
Are you sure you want to change the base?
Refactor using packages #1155
Conversation
@DimaGolomozy I decided to finish this idea :) |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
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.
so manny changes :)
LGTM
what do you think about passing |
@@ -1,11 +1,12 @@ | |||
package goreplay | |||
package http_modifier |
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.
don't use an underscore in package name
@@ -1,4 +1,4 @@ | |||
package goreplay | |||
package http_modifier |
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.
don't use an underscore in package name
@@ -1,4 +1,4 @@ | |||
package goreplay | |||
package http_modifier |
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.
don't use an underscore in package name
@@ -1,9 +1,10 @@ | |||
package goreplay | |||
package http_modifier |
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.
don't use an underscore in package name
@@ -1,6 +1,6 @@ | |||
//go:build gofuzz | |||
|
|||
package proto | |||
package http_proto |
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.
don't use an underscore in package name
@@ -14,11 +14,12 @@ Example of HTTP payload for future references, new line symbols escaped: | |||
\r\n | |||
\r\n | |||
*/ | |||
package proto | |||
package http_proto |
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.
don't use an underscore in package name
@@ -1,4 +1,4 @@ | |||
package proto | |||
package http_proto |
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.
don't use an underscore in package name
mu sync.RWMutex | ||
} | ||
|
||
// MiddlewareConfig represents a middleware configuration | ||
type MiddlewareConfig struct { |
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.
type name will be used as middleware.MiddlewareConfig by other packages, and that stutters; consider calling this Config
) | ||
|
||
// PrettifyHTTP prettifies HTTP payload | ||
func PrettifyHTTP(p []byte) []byte { |
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.
func name will be used as prettify.PrettifyHTTP by other packages, and that stutters; consider calling this HTTP
SonarCloud Quality Gate failed. 0 Bugs No Coverage information |
All code moved to packages, specifically to pkg folder.
In future it may need more ballance to transfer some of them to
internal
folder.In addition, added structured logger.