Commit Graph

300 Commits (master)

Author SHA1 Message Date
shandongzhejiang db23986b71 chore: fix some minor issues in the comments
Signed-off-by: shandongzhejiang <shandongzhejiang@icloud.com>
6 days ago
Matthieu MOREL 431dd63e80 enable all go-critic
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
1 month ago
Matthieu MOREL 6a79b392ac fix ignore nakedret
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2 months ago
Matthieu MOREL 71c74393f2 fix(ST1005): Incorrectly formatted error string
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2 months ago
Matthieu MOREL cefed48244 chore: enable staticcheck linter
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2 months ago
s0ders 0bbc484a68
refactor: using fmt.Errorf on some error returns.
The following brings:
- Refactoring of `InfoWithContext` to wrap errors with `fmt.Errorf` in
  order to add textual context, making error message more helpful for
  the end user.

ref: 1836
2 months ago
shirou fdbdf5188d [host]: fix potential error on CI test on Windows. 3 months ago
shirou 7b14b866f1
Merge pull request #1783 from mmorel-35/revive/unused-parameter
chore: enable unused-parameter from revive
3 months ago
shirou 9d29c70c52
Merge pull request #1813 from mmorel-35/gocritic
chore: enable gocritic linter
3 months ago
shirou 2ab27a0ba3
Merge pull request #1817 from mmorel-35/revive/var-naming
chore: enable var-naming from revive
3 months ago
shirou f26bf79e15 [host][process]: fix type missmatch test. 4 months ago
Matthieu MOREL dfdd90ab72 chore: enable gocritic linter 4 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
Lomanic ad534c24e9 [host][aix] Remove redundant 'or' in parseUptime() found by 'go test' 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
wangyu 8e62971eb0 add anolis family with anolis platform 8 months ago
shirou 37f531010d fix golangcilint errors, ignore gosec G115 10 months ago
Aidan dbab8d86e9 Additional error case found 1 year ago
Aidan 4ea639f0f8 Incorrect test comparisons 1 year ago
Aidan b206a02af4 Added tests for uptimer parser 1 year ago
Aidan b1ddeddda5 Removed repeated logic for days 1 year ago
Aidan bcde3cb240 Removed logging line 1 year ago
Aidan 8f3d0d0c57 Correctly parse new uptime case at zero minutes, has been tested against all test cases 1 year ago
Aidan 789cad37be Correctly parse new uptime case at zero minutes, has been tested against all test cases 1 year ago
Aidan 2b6d0754ed Comments 1 year ago
Aidan 42957707db Return error if hours not in expected format to prevent panic 1 year ago
Aidan 62e5850726 Fixed parsing error where 'day,' is ignored 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.wakayama 0e9c0ade3c [host][windows]: change platform version from build version to display version 1 year ago
shirou e9591b5b01 rename redundant test function names, such as TestCPU in cpu package 1 year ago
shirou ab0d977709 [sensors] move Temperatures from host to sensors. 1 year ago
shirou bc060cc227 add SPDX License, remove old build tag, and replace import 1 year ago
Dylan Myers ff4ae36cc0 Remove extraneous development note comments
Move a function from nocgo to main file for disk package
1 year ago
Dylan Myers 9bf502f825 Fix logic errors, syntax errors, and typos 1 year ago
Dylan Myers b133d602ce Ignore host_aix_ppc64 for now 1 year ago
Dylan Myers 8df2696709 Account for other possible formats output by AIX uptime command 1 year ago
Dylan Myers 9be5f7d0ad Remove extraneous -1 from users function for AIX 1 year ago
Dylan Myers bd42769f87 Add a working implementation of host.Users() for AIX 1 year ago
Dylan Myers 52d61b8669 Add host support for AIX 1 year ago
shirou cbefbb023e [host][linux]: add pading on linux_arm64 1 year ago
shirou cfb7a5dc2e [host][linux]: change Line/User/Host to int8 on utmp
Generated code is uint8 on arm64. However, it is not same as other archtectures.
This commit changes by hand.
1 year ago
shirou d86a995563 [host][linux]: fix utmp size on linux/arm64 1 year ago
Jonathan Matthew 27ffa28a0d add support for OpenBSD/riscv64 1 year ago
Bryce Kahle b0d976c49b
ensure host platform are files and have contents
In a containerized deployment, it is common to mount several files from /etc. Within the container, those files will be created regardless if they exist on the host or not. In those instances, the existing code would erroneously return empty platform information.
1 year ago