w1ndyb0y
86d473c03d
clean: remove deprecated utils/ package
...
- Remove all 5 files from utils/ (serial.go, socket.go, pulsar.go,
sqlite.go, telegram.go)
- cmd/root.go: remove utils import and all utils. references
- cmd/test.go: rewrite to use serial, storage, transport packages directly
with proper error logging via zap
2026-07-10 15:41:13 +08:00
w1ndyb0y
419f25f0dd
fix: comprehensive bug fixes and architecture restructuring
...
Phase 1 — Bug fixes (7 bugs):
- Bug 1: Pulsar mode data loss — always persist to SQLite regardless of mode
- Bug 2: PulsarSend closing TCP client — use independent resetPulsarProducer()
- Bug 3: Greedy regex — use non-greedy (?s)ZCZC.*?NNNN
- Bug 4: Data after NNNN discarded — keep remaining buffer data
- Bug 5: strings.Index > 0 boundary — use strings.Contains
- Bug 6: Variable shadowing in PulsarSend — use = not :=
- Bug 7: Accept failure nil panic — add continue + retry logic
Phase 2 — Architecture restructuring:
- Split utils/ into config/, serial/, telegram/, storage/, transport/
- Define Sender, Repository, Reader interfaces
- Introduce app/ layer with context.Context lifecycle
- Replace spinlock with sync.Mutex
- Unified Config struct replaces 15+ global vars
Phase 3 — Testing & tooling:
- telegram/parser_test.go (7 test cases)
- storage/store_test.go (5 test cases)
- transport/transport_test.go (4 test cases)
- Taskfile: add test, test-race, test-cover tasks
- Go version: 1.15 -> 1.21
2026-07-10 15:32:34 +08:00
w1ndyb0y
3ad4c76acd
add pulsar client
2021-02-01 15:35:13 +08:00
zhiqiang feng
93ae291efc
remove bytesize stopbits
2020-12-29 16:31:23 +08:00
zhiqiang feng
98425409a7
add panic error for raw
2020-12-28 17:27:24 +08:00
zhiqiang feng
1ab78d22b4
stdout priority level info
2020-12-28 17:08:41 +08:00
zhiqiang feng
68069dec34
add rawlog
2020-12-28 16:36:59 +08:00
zhiqiang feng
0619229ec5
add zap logger
2020-12-28 15:58:00 +08:00
zhiqiang feng
2cbfbdbbca
add zap for default logger
2020-12-28 11:06:36 +08:00
zhiqiang feng
710932d03b
add stopbits parameter , add serial docs
2020-12-24 10:35:13 +08:00
w1ndyb0y
540e682c0b
add socket
2020-12-21 17:58:30 +08:00
w1ndyb0y
92a10cd4e6
add lograw option
2020-12-21 16:18:22 +08:00
w1ndyb0y
8e417699c0
add test db
2020-12-21 11:36:08 +08:00
w1ndyb0y
5d0e0df125
init
2020-12-21 11:19:53 +08:00