We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create an empty project, only one main.go, code from readme.md
package main import ( "encoding/json" "fmt" "log" "os/user" "github.com/zcalusic/sysinfo" ) func main() { current, err := user.Current() if err != nil { log.Fatal(err) } if current.Uid != "0" { log.Fatal("requires superuser privilege") } var si sysinfo.SysInfo si.GetSysInfo() data, err := json.MarshalIndent(&si, "", " ") if err != nil { log.Fatal(err) } fmt.Println(string(data)) }
run build command
go build -o sys_info.exe .\main.go
failed:
PS E:\code\GoglandProjects\sys_info> go build -o sys_info.exe .\main.go # github.com/zcalusic/sysinfo C:\Users\Administrator\go\pkg\mod\github.com\zcalusic\sysinfo@v1.1.0\sysinfo.go:13:10: undefined: Kernel C:\Users\Administrator\go\pkg\mod\github.com\zcalusic\sysinfo@v1.1.0\sysinfo.go:48:5: si.getKernelInfo undefined (type *SysInfo has no field or method getKernelInfo) C:\Users\Administrator\go\pkg\mod\github.com\zcalusic\sysinfo@v1.1.0\network.go:104:41: undefined: syscall.SYS_IOCTL C:\Users\Administrator\go\pkg\mod\github.com\zcalusic\sysinfo@v1.1.0\network.go:104:87: not enough arguments in call to syscall.Syscall have (unknown type, uintptr, uintptr, uintptr) want (uintptr, uintptr, uintptr, uintptr, uintptr)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
create an empty project, only one main.go, code from readme.md
run build command
failed:
The text was updated successfully, but these errors were encountered: