mirror of
https://github.com/gopl-zh/gopl-zh.github.com.git
synced 2025-08-19 12:41:33 +00:00
good good study, day day up!
This commit is contained in:
19
vendor/gopl.io/ch10/cross/main.go
generated
vendored
Normal file
19
vendor/gopl.io/ch10/cross/main.go
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
// Copyright © 2016 Alan A. A. Donovan & Brian W. Kernighan.
|
||||
// License: https://creativecommons.org/licenses/by-nc-sa/4.0/
|
||||
|
||||
// See page 295.
|
||||
|
||||
// The cross command prints the values of GOOS and GOARCH for this target.
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
//!+
|
||||
func main() {
|
||||
fmt.Println(runtime.GOOS, runtime.GOARCH)
|
||||
}
|
||||
|
||||
//!-
|
Reference in New Issue
Block a user