aboutsummaryrefslogtreecommitdiffhomepage
path: root/testdata/stdlib.go
blob: a06a6cbf2fdd3dbcd6837d4758f7b40e8ac6405a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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'))
}