Skip to content

Instantly share code, notes, and snippets.

@baude
Created March 24, 2017 17:12
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 baude/0d89a890c05c8ca5ec1098912331663d to your computer and use it in GitHub Desktop.
Save baude/0d89a890c05c8ca5ec1098912331663d to your computer and use it in GitHub Desktop.
show distribution
package main
import (
"io/ioutil"
"fmt"
)
func check(e error) {
if e != nil {
panic(e)
}
}
func main() {
distro, err := ioutil.ReadFile("/etc/redhat-release")
check(err)
fmt.Println(string(distro))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment