github.com/u-root/u-root@v7.0.1-0.20200915234505-ad7babab0a8e+incompatible/cmds/core/id/id_plan9.go (about) 1 // Copyright 2017-2018 the u-root 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 // +build plan9 6 7 package main 8 9 import ( 10 "fmt" 11 "io/ioutil" 12 "log" 13 "os" 14 ) 15 16 func main() { 17 if len(os.Args) != 1 { 18 log.Fatalf("Usage: id") 19 } 20 id, err := ioutil.ReadFile("/env/user") 21 if err != nil { 22 log.Fatal(err) 23 } 24 fmt.Println(string(id)) 25 }