github.com/mvdan/u-root-coreutils@v0.0.0-20230122170626-c2eef2898555/cmds/exp/rush/info.go (about) 1 // Copyright 2021 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 // info command 6 // 7 // Synopsis: 8 // 9 // info 10 // 11 // Description: 12 // 13 // Print out info about our environment. 14 // 15 // Example: 16 // 17 // $ info 18 // Version, goos, etc. 19 // 20 // Note: 21 // 22 // Bugs: 23 package main 24 25 import ( 26 "fmt" 27 "os" 28 "runtime" 29 ) 30 31 func init() { 32 addBuiltIn("rushinfo", infocmd) 33 } 34 35 func infocmd(c *Command) error { 36 _, err := fmt.Fprintf(c.Stdout, "%s %s %s %q: builtins %v\n", runtime.Version(), runtime.GOOS, runtime.GOARCH, os.Args, builtins) 37 return err 38 }