提交 299f1a4a 编写于 作者: qq_34599247's avatar qq_34599247

Update go的fmt包.md

上级 fed0291f
......@@ -11,4 +11,12 @@ go中的fmt包相当于java中的lang包,不过它不会默认导入。
负数:向右填充空格
例:fmt.Printf("%-8v @%5v", "tony", 3896)
输出:tony**** @*3896 (为了对比,此处使用*表示空格)
```
#### 3.rand包
```
使用 import "math/rand"
使用rand包可以生成随机数:
Intn: 返回指定范围内的一个随机整数。
例:rand.Intn(10), 返回[0,10)内的一个随机整数。
```
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册