Open vkorbes opened 4 years ago
https://play.golang.org/p/LHF7rulvjNQ
package main
import (
"fmt"
"runtime"
)
/* - Crie um programa que demonstra seu OS e ARCH.
- Rode-o com os seguintes comandos:
- go run
- go build
- go install */
func main() {
fmt.Println("OS: ", runtime.GOOS)
fmt.Println("ARCH: ", runtime.GOARCH)
}
Output
The Go Playground
Imports
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package main
import (
"fmt"
)
func main() {
fmt.Println("Hello, playground")
}
OS: linux
ARCH: amd64
Program exited.
output from pc
Cap. 20 – Exercícios: Nível #9 – 6 https://go.dev/play/p/HI3GMRZ19tU https://code.sololearn.com/cJJZ7jEbM26C https://github.com/wfrsilva/aprendago/commit/6fa90db50db85a2f36013b49f947fc80651b0cf3 Meu go install deu crepe tbm
package main
import (
"fmt"
"runtime"
)
func main() {
fmt.Println("Meu OS é ", runtime.GOOS)
fmt.Println("Meu Arquitetra é ", runtime.GOARCH)
}
Exercício: Capítulo 20, Exercício 6 (Nível: 9)
Use esta thread para compartilhar sua solução, discutir o exercício com os colegas e pedir ajuda caso tenha dificuldades!