diff options
author | Baitinq <manuelpalenzuelamerino@gmail.com> | 2024-05-02 17:51:11 +0200 |
---|---|---|
committer | Baitinq <manuelpalenzuelamerino@gmail.com> | 2024-05-02 17:51:11 +0200 |
commit | d77a4faea818712b24edf9b27093c3b84b7ff85e (patch) | |
tree | c638413818f8871a2decbb613e15b163d0a173ce | |
parent | payload-processor: add stub (diff) | |
download | fs-tracer-backend-d77a4faea818712b24edf9b27093c3b84b7ff85e.tar.gz fs-tracer-backend-d77a4faea818712b24edf9b27093c3b84b7ff85e.tar.bz2 fs-tracer-backend-d77a4faea818712b24edf9b27093c3b84b7ff85e.zip |
misc: clean up unnecessary use of ptrs
-rw-r--r-- | src/payload-processor/processor/processor.go | 6 | ||||
-rw-r--r-- | src/rest-api/handler/handler.go | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/payload-processor/processor/processor.go b/src/payload-processor/processor/processor.go index 9cd83f9..3eb089b 100644 --- a/src/payload-processor/processor/processor.go +++ b/src/payload-processor/processor/processor.go @@ -11,15 +11,15 @@ type Processor struct { queueName string } -func NewProcessor(ch *amqp.Channel, queueName string) *Processor { +func NewProcessor(ch *amqp.Channel, queueName string) Processor { log.Println("Created processor") - return &Processor{ + return Processor{ ch: ch, queueName: queueName, } } -func (p *Processor) ProcessMessages() { +func (p Processor) ProcessMessages() { msgs, err := p.ch.Consume( p.queueName, // queue "", // consumer diff --git a/src/rest-api/handler/handler.go b/src/rest-api/handler/handler.go index c904ff4..b9bb80e 100644 --- a/src/rest-api/handler/handler.go +++ b/src/rest-api/handler/handler.go @@ -16,14 +16,14 @@ type Handler struct { queueName string } -func NewHandler(ch *amqp.Channel, queueName string) *Handler { - return &Handler{ +func NewHandler(ch *amqp.Channel, queueName string) Handler { + return Handler{ ch: ch, queueName: queueName, } } -func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { +func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { bytes, err := io.ReadAll(io.Reader(r.Body)) if err != nil { log.Fatal(err) |