Source file src/cmd/internal/osinfo/os_plan9.go
1 // Copyright 2022 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 //go:build plan9 6 7 package osinfo 8 9 import ( 10 "os" 11 ) 12 13 // Version returns the OS version name/number. 14 func Version() (string, error) { 15 b, err := os.ReadFile("/dev/osversion") 16 if err != nil { 17 return "", err 18 } 19 20 return string(b), nil 21 } 22