From c7d4f5a6e4fa083a93c494b1ba2cd01d6cfeb29f Mon Sep 17 00:00:00 2001 From: simylein <67859356+simylein@users.noreply.github.com> Date: Fri, 24 Jan 2025 18:27:48 +0000 Subject: [PATCH] chore(encoder): no more useless types --- pkg/encoder/encoder.go | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/pkg/encoder/encoder.go b/pkg/encoder/encoder.go index f422ab1..5557e89 100644 --- a/pkg/encoder/encoder.go +++ b/pkg/encoder/encoder.go @@ -1,24 +1,5 @@ package encoder -import "reflect" - -// FieldConfig defines the structure of a single field in the payload -type FieldConfig struct { - Name string - Start int - Length int - Transform func(interface{}) interface{} - Optional bool - Hex bool -} - -// PayloadConfig defines the overall structure of the payload, including the target struct type -type PayloadConfig struct { - Fields []FieldConfig - TargetType reflect.Type - StatusByteIndex *int // can be nil -} - type Encoder interface { Encode(interface{}, int16, string) (interface{}, interface{}, error) }