Created
January 26, 2020 13:35
-
-
Save raspi/36f0edff60d41f077ee6fcad7808294b to your computer and use it in GitHub Desktop.
Go UUID from kernel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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