Skip to content

Instantly share code, notes, and snippets.

@raspi
Created January 26, 2020 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raspi/36f0edff60d41f077ee6fcad7808294b to your computer and use it in GitHub Desktop.
Save raspi/36f0edff60d41f077ee6fcad7808294b to your computer and use it in GitHub Desktop.
Go UUID from kernel
package main
import (
"fmt"
"io/ioutil"
"strings"
)
func main() {
b, _ := ioutil.ReadFile(`/proc/sys/kernel/random/uuid`)
fmt.Print(strings.TrimSpace(string(b)))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment