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

Refactor using packages #1155

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Refactor using packages #1155

wants to merge 7 commits into from

Conversation

buger
Copy link
Owner

@buger buger commented Jan 15, 2023

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.

@buger
Copy link
Owner Author

buger commented Jan 15, 2023

@DimaGolomozy I decided to finish this idea :)

Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
@sonarcloud
Copy link

sonarcloud bot commented Jan 15, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 45 Code Smells

No Coverage information No Coverage information
3.1% 3.1% Duplication

Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Repository owner deleted a comment from houndci-bot Jan 15, 2023
Copy link
Contributor

@DimaGolomozy DimaGolomozy left a 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

@DimaGolomozy
Copy link
Contributor

what do you think about passing context.Context? that way a global context could stop the gor
(but this in a different PR)

@@ -1,11 +1,12 @@
package goreplay
package http_modifier
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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 {
Copy link
Collaborator

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 {
Copy link
Collaborator

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
Copy link

sonarcloud bot commented Mar 7, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 1 Security Hotspot
Code Smell A 45 Code Smells

No Coverage information No Coverage information
3.1% 3.1% Duplication

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