Skip to content

Commit

Permalink
Update sysinfo.go
Browse files Browse the repository at this point in the history
  • Loading branch information
fffaraz committed Oct 28, 2022
1 parent c1c2c98 commit a0045c7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sysinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Package sysinfo is a Go library providing Linux OS / kernel / hardware system information.
package sysinfo

import "runtime"

// SysInfo struct encapsulates all other information structs.
type SysInfo struct {
Meta Meta `json:"sysinfo"`
Expand All @@ -23,6 +25,10 @@ type SysInfo struct {

// GetSysInfo gathers all available system information.
func (si *SysInfo) GetSysInfo() {
if runtime.GOOS != "linux" {
return
}

// Meta info
si.getMetaInfo()

Expand Down

0 comments on commit a0045c7

Please sign in to comment.