mirror of https://github.com/tinygo-org/tinygo.git
wasmstm32webassemblymicrocontrollerarmavrspiwasiadafruitarduinocircuitplayground-expressgpioi2cllvmmicrobitnrf51nrf52nrf52840samd21tinygo
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
380 B
21 lines
380 B
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"math/rand"
|
|
"os"
|
|
"strings"
|
|
)
|
|
|
|
func main() {
|
|
// package os, fmt
|
|
fmt.Println("stdin: ", os.Stdin.Fd())
|
|
fmt.Println("stdout:", os.Stdout.Fd())
|
|
fmt.Println("stderr:", os.Stderr.Fd())
|
|
|
|
// package math/rand
|
|
fmt.Println("pseudorandom number:", rand.Int31())
|
|
|
|
// package strings
|
|
fmt.Println("strings.IndexByte:", strings.IndexByte("asdf", 'd'))
|
|
}
|
|
|