Commit Graph

116 Commits (db23986b718c8e56e23ae9f295dc8ae9fd808db7)

Author SHA1 Message Date
shandongzhejiang db23986b71 chore: fix some minor issues in the comments
Signed-off-by: shandongzhejiang <shandongzhejiang@icloud.com>
7 days ago
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 9d29c70c52
Merge pull request #1813 from mmorel-35/gocritic
chore: enable gocritic linter
3 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
wangyu 8e62971eb0 add anolis family with anolis platform 8 months 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
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
shirou b10acd4894 [host]: add EnableBootTimeCache function 1 year ago
Ville Skyttä 362fa4b9c4 Avoid repeated regexp compilations 2 years ago
Xie Weineng 0de2d14a7c add deepin and uos distro 2 years ago
shirou 0665cafa1b chore: replace deprecated ioutil package to os and io 2 years ago
shirou 3748c19402 [host][linux]: remove double quote from lsb release info
fix: #1502
2 years ago
Antoine Toulme 38b94668ea allow to pass context values to override environment variables 2 years ago
Matthieu MOREL 1fb1e3e3e6 ci(lint): correct gci linter
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2 years ago
Josh Powers e7c6b6991d
fix: moves common.Warnings to common OS files
This allows all OS types to unwrap the Warnings from errors, and not
just linux in host or windows in disk.

fixes: #1429
2 years ago
Jacob Young 02660eaf7c
Update host/host_linux.go
Use a raw string instead of escaped quotes.

Co-authored-by: shirou <shirou.faw@gmail.com>
2 years ago
Jacob Young 43566581f0 Recognize Cumulus Linux distro
Add Cumulus Linux and Kylin to debian family
2 years ago
shirou e563e6394e
Merge pull request #1356 from N1neSun/patch-1
fix some kylin linux bug
2 years ago
Tobias Klauser f9a5834e0e
host: use unix.ByteSliceToString
Use ByteSliceToString provided in golang.org/x/sys/unix to convert
\0-terminated byte slices to strings.
3 years ago
shirou 5473fd114d [disk][host]: change to use type alias. 3 years ago
shirou 4ac7e99c6a [disk][host]: move back Warnings from internal to disk and host.
fix #1377
3 years ago
Antoine Toulme dbc0f20fe3 code review 3 years ago
N1neSun add9158d4e fix some kylin linux bug 3 years ago
shirou 5610fbc5d5 fix(host,linux): Check if path exists and is nonempty before reading host files 3 years ago
yueyt 15354cbdee add neokylin host info on linux 3 years ago
Ville Skyttä f7e1f36418 refactor: remove unnecessary exec.LookPath calls
Executing the command does the lookup if needed and returns the same
error when not found, no need to do it separately.
3 years ago
Lammert Hellinga 001699bed7 Let almalinux be part of the rhel family 3 years ago
mmorel-35 1e6b445a8a gofumpt 4 years ago
shirou 0969c9436b delete v2 directory, move v3 to top #1078 4 years ago
odinje a3e22baec0 Ensure rhel platform family for Rocky Linux 4 years ago
Mykola Terelia 84e8e51bf9 Added missing distributions to the suse platform family 4 years ago
shirou 6c9f3bdcae [host][linux] Change to use unix.SysInfo_t to get Uptime in Linux 5 years ago
Sergey Vinogradov 5209442b3c Refactor "host" package 5 years ago
shirou a81cf97fce
Merge pull request #861 from Lomanic/issue391
[host][linux] Fix #391 retrieve sensors temps on OSes lacking hwmon
5 years ago
Tim Gross c69ef749eb fix host.Info() panic if /etc/debian_version is empty
The ReadLines helper function doesn't guarantee that the length of
lines is non-zero or that the lines have contents. Most callers
include a check for length but this was missing for version
fingerprinting on Debian if `/etc/debian_version` was empty, leading
to a panic.
6 years ago
Lomanic c58a1e8ec7 [host][linux] Fix #391 retrieve sensors temps on OSes lacking hwmon 6 years ago
Aman Gupta 62a406ec1b
Trim null bytes from kernel version 6 years ago
shirou 8a5bcfdb53
Merge pull request #739 from Lomanic/issue738
[host][linux] Fix #738 use uname syscall to get version in KernelVersion()
6 years ago
Lomanic 4bf185067d [host] Fix #737 add KernelArch field in InfoStat struct returning 'uname -m' result 6 years ago
Lomanic 8c28c3ba17 [host][linux] Fix #738 use uname syscall to get version in KernelVersion() 6 years ago
Lomanic 9219f16f03 [host][linux] Fix #340 return Solus OS as from the "solus" PlatformFamily in Info() 6 years ago
shirou 7c2ac48f84
Merge branch 'master' into td-remove-cycle 6 years ago
shirou 3d9d5e60ef
Merge pull request #688 from asnowfox/master
use /proc/buc/pci/devices to identify a VM is a guest
6 years ago
shirou d8686bcd5c
Merge pull request #675 from marcv81/fix_665_v2
Fix for #665
6 years ago
Lomanic 3af6e1ffe7 [host][linux] Properly handle double quotes in /etc/os-release in PlatformInformation 6 years ago
Arturo Reuschenbach Puncernau 2a0b67d19c added sles to the suse platform family 6 years ago