GolangStudy/day1/day-1.go

16 lines
556 B
Go
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package main
import "fmt"
func main() {
fmt.Println("hello")
}
//1.修改 echo 程序,使其能够打印 os.Args[0],即被执行命令本身的名字。
//切片第一个参数改为0
//2.练习 1.2 修改 echo 程序,使其打印每个参数的索引和值,每个一行。
//空格改为 控制符 \n
//3.练习 1.3 做实验测量潜在低效的版本和使用了 strings.Join 的版本的运行时间差异。1.6 节讲解了部分 time 包11.4 节展示了如何写标准测试程序,以得到系统性的性能评测。)