
上QQ阅读APP看书,第一时间看更新
How to do it...
The following steps cover the solution:
- Open the console and create the folder chapter01/recipe01.
- Navigate to the directory.
- Create the main.go file with the following content:
package main
import (
"log"
"runtime"
)
const info = `
Application %s starting.
The binary was build by GO: %s`
func main() {
log.Printf(info, "Example", runtime.Version())
}
- Run the code by executing the go run main.go.
- See the output in the Terminal:
