aboutsummaryrefslogtreecommitdiff
path: root/hotline/client_conn.go
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2022-06-24 10:41:37 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2022-06-24 10:41:37 -0700
commit3178ae580a3fe97d6a1167b4346d209f04e9b7e3 (patch)
treeda306047792334bbb97e07707d713d3fa582753a /hotline/client_conn.go
parenta1ac9a6f60c6881bb9fe97425f6aaa524b910035 (diff)
Implement bufio.Scanner for transaction parsing
Diffstat (limited to 'hotline/client_conn.go')
-rw-r--r--hotline/client_conn.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/hotline/client_conn.go b/hotline/client_conn.go
index 1186947..41810a8 100644
--- a/hotline/client_conn.go
+++ b/hotline/client_conn.go
@@ -54,7 +54,7 @@ func (cc *ClientConn) sendAll(t int, fields ...Field) {
}
}
-func (cc *ClientConn) handleTransaction(transaction *Transaction) error {
+func (cc *ClientConn) handleTransaction(transaction Transaction) error {
requestNum := binary.BigEndian.Uint16(transaction.Type)
if handler, ok := TransactionHandlers[requestNum]; ok {
for _, reqField := range handler.RequiredFields {
@@ -80,7 +80,7 @@ func (cc *ClientConn) handleTransaction(transaction *Transaction) error {
cc.logger.Debugw("Received Transaction", "RequestType", handler.Name)
- transactions, err := handler.Handler(cc, transaction)
+ transactions, err := handler.Handler(cc, &transaction)
if err != nil {
return err
}