From 09d7d422546c5daf44ca5ca295210b98b790f808 Mon Sep 17 00:00:00 2001 From: Erik Schweller Date: Tue, 8 Jun 2021 14:05:16 -0400 Subject: [PATCH] Address issues flagged by (#938) --- elasticsearch.go | 2 +- input_kafka.go | 2 +- output_s3.go | 2 +- output_tcp.go | 2 +- plugins.go | 2 +- proto/proto.go | 2 +- s3_reader.go | 2 +- settings.go | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/elasticsearch.go b/elasticsearch.go index af57db1..6914cc5 100644 --- a/elasticsearch.go +++ b/elasticsearch.go @@ -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) { diff --git a/input_kafka.go b/input_kafka.go index 9f660bd..dc33e21 100644 --- a/input_kafka.go +++ b/input_kafka.go @@ -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 diff --git a/output_s3.go b/output_s3.go index 5779a3f..cdebfbf 100644 --- a/output_s3.go +++ b/output_s3.go @@ -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") } } diff --git a/output_tcp.go b/output_tcp.go index 79f7f3b..f03e8ac 100644 --- a/output_tcp.go +++ b/output_tcp.go @@ -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 diff --git a/plugins.go b/plugins.go index 7ea6ab3..b1cef48 100644 --- a/plugins.go +++ b/plugins.go @@ -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 diff --git a/proto/proto.go b/proto/proto.go index 3de61da..bb5a776 100644 --- a/proto/proto.go +++ b/proto/proto.go @@ -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 diff --git a/s3_reader.go b/s3_reader.go index 46198dd..5a26b83 100644 --- a/s3_reader.go +++ b/s3_reader.go @@ -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, diff --git a/settings.go b/settings.go index 928de3b..9a9cffa 100644 --- a/settings.go +++ b/settings.go @@ -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")