w1ndyb0y
4191868f00
fix: improve local Pulsar connectivity checks
2026-07-10 17:07:42 +08:00
w1ndyb0y
46be9f483f
docs: update README with new architecture and project structure
...
- Add architecture diagram and data flow
- Add project directory structure tree
- Add technology stack table
- Add Taskfile-based quick start and common commands
- Add cross-compilation instructions
- Add full config YAML example with all options
- Add test section with coverage info
- Add license section
- Keep existing download and release links
2026-07-10 16:07:48 +08:00
w1ndyb0y
7f65004cd4
test: add missing tests and fix hanging transport test
...
New test packages:
- config/loader_test.go: 5 tests (valid, minimal, missing file, pulsar-only, defaults)
- serial/serial_test.go: 6 tests (interface, read, EOF, close, empty)
- app/app_test.go: 5 tests (New, dispatch store/send, error handling, ctx cancellation)
Enhanced test packages:
- storage/store_test.go: +3 tests (concurrent insert, close/reopen, init clears)
- telegram/parser_test.go: +5 tests (concurrency, rawLog, empty, multiline, removeEmpty)
- transport/transport_test.go: +7 tests, +fixes
Fixes:
- app.go: store field type *storage.Store -> storage.Repository (supports mocking)
- transport_test: fix net.Pipe() sync deadlock in SetConnClosesPrevious
- transport_test: fix MultiSender_ErrorPropagation expectations
Results: 6 packages, 30+ tests, all pass with -race
2026-07-10 16:05:19 +08:00
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
zhiqiang feng
5f3334ec87
send log
2021-02-01 17:46:20 +08:00
w1ndyb0y
133c80088c
check tcp when insert telegram to db
2021-02-01 17:29:01 +08:00
w1ndyb0y
fe1a8169e6
move pulsar send to telegram.go
2021-02-01 17:13:54 +08:00
w1ndyb0y
9ec63dd8b8
create producer
2021-02-01 17:07:52 +08:00
w1ndyb0y
b9a826faf8
pulsar write
2021-02-01 17:03:24 +08:00
w1ndyb0y
980c52c940
log message id
2021-02-01 16:09:35 +08:00
zhiqiang feng
d570e6cee8
change default device
2021-02-01 16:07:00 +08:00
fengzhiqiang
994b432820
ignore logs
2021-02-01 15:46:13 +08:00
w1ndyb0y
bd2a379d17
add test
2021-02-01 15:42:46 +08:00
w1ndyb0y
3ad4c76acd
add pulsar client
2021-02-01 15:35:13 +08:00
w1ndyb0y
9a14fb2cef
update mod
2021-01-25 17:54:13 +08:00
w1ndyb0y
98cf3fa0e3
ignore rawlog error
2020-12-31 10:46:34 +08:00
w1ndyb0y
b0836f95b0
remove brace
2020-12-31 10:45:07 +08:00
w1ndyb0y
94cdfe3886
Merge branch 'develop' of gitee.com:w1ndyb0y/tele-recv into develop
2020-12-31 10:28:15 +08:00
zhiqiang feng
70577878fa
start
2020-12-29 17:23:07 +08:00
zhiqiang feng
2ee7a191ab
test env
2020-12-29 17:18:28 +08:00
zhiqiang feng
0cf34d5d0d
config
2020-12-29 17:13:07 +08:00
zhiqiang feng
cd05cfcc0e
readme download
2020-12-29 16:54:05 +08:00
zhiqiang feng
91cee480df
Merge tag 'v0.0.9' into develop
...
remove old parameter
2020-12-29 16:41:32 +08:00
zhiqiang feng
d80cb0e3f4
Merge branch 'release/v0.0.9'
2020-12-29 16:41:16 +08:00
zhiqiang feng
a958f94dba
version 0.0.9
2020-12-29 16:41:08 +08:00
zhiqiang feng
a567e10481
fix stopbits bytesize
2020-12-29 16:38:53 +08:00
zhiqiang feng
a3d0cf998b
Merge tag 'v0.0.7' into develop
...
remove stopbits and bytesize
2020-12-29 16:34:50 +08:00
zhiqiang feng
c3ca2df6d7
Merge branch 'release/v0.0.7'
2020-12-29 16:34:31 +08:00
zhiqiang feng
7aebac5e41
version 0.0.7
2020-12-29 16:34:20 +08:00
zhiqiang feng
93ae291efc
remove bytesize stopbits
2020-12-29 16:31:23 +08:00
zhiqiang feng
0aee912649
release file name
2020-12-29 16:06:52 +08:00
zhiqiang feng
926dbf4f84
Merge tag 'v0.0.6' into develop
...
cgo=1
2020-12-29 15:43:52 +08:00
zhiqiang feng
5153e12cd9
Merge branch 'release/v0.0.6'
2020-12-29 15:43:40 +08:00
zhiqiang feng
73b5b287fe
cgo=1
2020-12-29 15:43:33 +08:00
zhiqiang feng
33ef54f261
linux build with cgo=1
2020-12-29 15:21:59 +08:00
zhiqiang feng
d48aa350c8
use golang gcc cross build image
2020-12-29 15:17:47 +08:00
zhiqiang feng
a662c7e6de
Merge tag 'v0.0.5' into develop
...
update windows build script
2020-12-29 14:46:43 +08:00
zhiqiang feng
b08775b507
Merge branch 'release/v0.0.5'
2020-12-29 14:46:24 +08:00
zhiqiang feng
eb83ad4ff1
version 0.0.5
2020-12-29 14:46:02 +08:00
zhiqiang feng
1a4db71b93
update windows build script
2020-12-29 14:45:13 +08:00
zhiqiang feng
f9ddfeaab4
Merge tag 'v0.0.4' into develop
...
fix tar file
2020-12-29 13:58:02 +08:00
zhiqiang feng
50a0014de9
Merge branch 'release/v0.0.4'
2020-12-29 13:57:46 +08:00
zhiqiang feng
9043426601
version 0.0.4
2020-12-29 13:57:15 +08:00
zhiqiang feng
eac1bd1ad6
Merge tag 'v0.0.3' into develop
...
use new serial port library
2020-12-29 13:02:00 +08:00
zhiqiang feng
de225eaa83
Merge branch 'release/v0.0.3'
2020-12-29 13:01:24 +08:00
zhiqiang feng
0731d07419
version 0.0.3
2020-12-29 13:00:59 +08:00
zhiqiang feng
6d60c3b2e1
Merge branch 'feature/impl-argandas-serial' into develop
2020-12-29 12:57:50 +08:00
zhiqiang feng
80b7566d26
always new client, close old one
2020-12-29 12:36:13 +08:00
zhiqiang feng
dd9514ea97
socket client nil
2020-12-29 12:27:01 +08:00