Address issues flagged by (#938)

This commit is contained in:
Erik Schweller
2021-06-08 21:05:16 +03:00
committed by GitHub
parent 22f0b09883
commit 09d7d42254
8 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ type ESRequestResponse struct {
//
// Proper format is: scheme://[userinfo@]host/index_name
// userinfo is: user[:password]
// net/url.Parse() does not fail if scheme is not provided but actualy does not
// net/url.Parse() does not fail if scheme is not provided but actually does not
// handle URI properly.
// So we must 'validate' URI format to match requirements to use net/url.Parse()
func parseURI(URI string) (err error, index string) {
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"github.com/Shopify/sarama/mocks"
)
// KafkaInput is used for recieving Kafka messages and
// KafkaInput is used for receiving Kafka messages and
// transforming them into HTTP payloads.
type KafkaInput struct {
config *InputKafkaConfig
+1 -1
View File
@@ -63,7 +63,7 @@ func NewS3Output(pathTemplate string, config *FileOutputConfig) *S3Output {
func (o *S3Output) connect() {
if o.session == nil {
o.session = session.Must(session.NewSession(awsConfig()))
log.Println("[S3 Output] S3 connection succesfully initialized")
log.Println("[S3 Output] S3 connection successfully initialized")
}
}
+1 -1
View File
@@ -11,7 +11,7 @@ import (
// TCPOutput used for sending raw tcp payloads
// Currently used for internal communication between listener and replay server
// Can be used for transfering binary payloads like protocol buffers
// Can be used for transferring binary payloads like protocol buffers
type TCPOutput struct {
address string
limit int
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"strings"
)
// Message represents data accross plugins
// Message represents data across plugins
type Message struct {
Meta []byte // metadata
Data []byte // actual data
+1 -1
View File
@@ -198,7 +198,7 @@ func Body(payload []byte) []byte {
return payload[pos:]
}
// Path takes payload and retuns request path: Split(firstLine, ' ')[1]
// Path takes payload and returns request path: Split(firstLine, ' ')[1]
func Path(payload []byte) []byte {
if !HasRequestTitle(payload) {
return nil
+1 -1
View File
@@ -60,7 +60,7 @@ func NewS3ReadCloser(path string) *S3ReadCloser {
bucket, key := parseS3Url(path)
sess := session.Must(session.NewSession(awsConfig()))
log.Println("[S3 Input] S3 connection succesfully initialized", path)
log.Println("[S3 Input] S3 connection successfully initialized", path)
return &S3ReadCloser{
bucket: bucket,
+1 -1
View File
@@ -123,7 +123,7 @@ func init() {
flag.StringVar(&Settings.OutputFileConfig.BufferPath, "output-file-buffer", "/tmp", "The path for temporary storing current buffer: \n\tgor --input-raw :80 --output-file s3://mybucket/logs/%Y-%m-%d.gz --output-file-buffer /mnt/logs")
flag.BoolVar(&Settings.PrettifyHTTP, "prettify-http", false, "If enabled, will automatically decode requests and responses with: Content-Encoding: gzip and Transfer-Encoding: chunked. Useful for debugging, in conjuction with --output-stdout")
flag.BoolVar(&Settings.PrettifyHTTP, "prettify-http", false, "If enabled, will automatically decode requests and responses with: Content-Encoding: gzip and Transfer-Encoding: chunked. Useful for debugging, in conjunction with --output-stdout")
// input raw flags
flag.Var(&Settings.InputRAW, "input-raw", "Capture traffic from given port (use RAW sockets and require *sudo* access):\n\t# Capture traffic from 8080 port\n\tgor --input-raw :8080 --output-http staging.com")