Documentation ¶
Overview ¶
Package version gets the kernel and version information from the /proc/version file. Instead of returning a Go struct, it returns JSON serialized bytes. A function to deserialize the JSON serialized bytes into a version.Kernel struct is provided.
Note: the package name is version and not the final element of the import path (json).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Deserialize ¶
Deserialize takes some JSON serialized bytes and deserializes them as version.Kernel.
func Get ¶
Get gets the kernel information from the /proc/version file as JSON serialized bytes using the package's global Profiler.
Types ¶
type Profiler ¶
Profiler processes the version information, /proc/version, using JSON.
func NewProfiler ¶
Returns an initialized Profiler; ready to use.
func (*Profiler) Get ¶
Get gets the kernel information from the /proc/version file as JSON serialized bytes.