Created
March 24, 2017 17:12
-
-
Save baude/0d89a890c05c8ca5ec1098912331663d to your computer and use it in GitHub Desktop.
show distribution
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 ( | |
"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