goInfo

package module
v0.0.0-...-58a8c41 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2020 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Introduction:

GoInfo is get os platform information coding by Golang.

It can help you to know os information.

Version:

version:0.0.1

Futures

get linux information

get windows information

get osx information

get freebsd information

Install:

  go get github.com/matishsiao/goInfo
  go build

Struct:

  type GoInfoObject struct {
	GoOS string
	Kernel string
	Core string
	Platform string
	OS string
	Hostname string
	CPUs int
}

Example:

   package main

   import (
	   "github.com/matishsiao/goInfo"
   )

   func main() {
		gi := goInfo.GetInfo()
		gi.VarDump()
	 }
}

It's will show:

   GoOS: linux
   Kernel: Linux
   Core: 3.13.0-27-generic
   Platform: x86_64
   OS: GNU/Linux
   Hostname: ubuntu
   CPUs: 1

##License and Copyright This software is Copyright 2012-2014 Matis Hsiao.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoInfoObject

type GoInfoObject struct {
	GoOS     string
	Kernel   string
	Core     string
	Platform string
	OS       string
	Hostname string
	CPUs     int
}

func GetInfo

func GetInfo() *GoInfoObject

func (*GoInfoObject) String

func (gi *GoInfoObject) String() string

func (*GoInfoObject) VarDump

func (gi *GoInfoObject) VarDump()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL