Matthieu MOREL
431dd63e80
enable all go-critic
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
1 month ago
shirou
7b14b866f1
Merge pull request #1783 from mmorel-35/revive/unused-parameter
...
chore: enable unused-parameter from revive
3 months ago
shirou
2ab27a0ba3
Merge pull request #1817 from mmorel-35/revive/var-naming
...
chore: enable var-naming from revive
3 months ago
Matthieu MOREL
9925fd41ec
chore: enable var-naming from revive
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
4 months ago
Matthieu MOREL
dc9b409803
chore: enable unused-parameter from revive
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
4 months ago
Matthieu MOREL
a5e496769c
chore: enable begin rule from thelper
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
4 months ago
Matthieu MOREL
8c1a718a5d
chore: use testify instead of testing
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
4 months ago
Matthieu MOREL
0a45e0f24d
chore(golangci-lint): cover aix and cgo
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
4 months ago
Matthieu MOREL
30aff030d0
chore(golangci-lint): GOOS and GOARCH matrix
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
4 months ago
Matthieu MOREL
9ce2ec161e
chore: enable golangci-lint on Windows and MacOS
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
5 months ago
uubulb
1f39525d2d
refactor(darwin): optimize string allocation
6 months ago
Li Chuangbo
19082b35ae
fix: memory leak and string corruption in ARM Mac temperature sensors
...
This commit addresses several issues in the temperature sensor implementation for ARM Mac:
1. Memory leak caused by unreleased system resources
2. Increasing port counts in Activity Monitor
3. String corruption where the first character becomes "\x00"
Changes:
1. Resource Management:
- Added proper resource cleanup using `defer` statements
- Refactored code to share the HID system client instead of creating new ones
- Fixed memory leaks by ensuring all CoreFoundation objects are properly released
2. String Handling:
- Fixed buffer allocation for string conversion
- Properly handle null terminators in C string to Go string conversion
- Added correct string length calculations
3. Code Structure:
- Reduced resource allocation by sharing system client between functions
- Enhanced code readability with better comments
6 months ago
uubulb
10d9c04c2e
sensors: avoid passing nil pointer to CFArrayGetCount
9 months ago
Henry Dollman
112f4c00b7
Fix error message typo in sensors_linux
9 months ago
uubulb
701a74be41
feat(cpu, mem, sensors)(darwin): cgo-free implementations
10 months ago
shirou
37f531010d
fix golangcilint errors, ignore gosec G115
10 months ago
shirou
5f158096be
fix: golangci lint with max -> maxConn
11 months ago
Alessandro De Angelis
ba82fefdee
fix: add SPDX
1 year ago
Alessandro De Angelis
fec0b2fcc6
fix: read temperature sensors darwin arm
1 year ago
UUBulb
4610b55878
fix: typo in `sensors_freebsd` package name
1 year ago
XXIV
e19951c34f
fix memory leak
1 year ago
shirou
aca0ba4517
[aix]: move tempereture from host to sensors package.
1 year ago
shirou
c34d29a8bf
fix: rename v3 that remained in file c to v4
1 year ago
shirou
d725bd1786
fix lint
1 year ago
shirou
5dfaba1490
[sensors][linux]: add ExLinux on sensors.
...
This commit references and fixes #1589 . Thank you!
1 year ago
shirou
ab0d977709
[sensors] move Temperatures from host to sensors.
1 year ago