30天30个Golang程序学习(一)(格式化输出)
第一天:
package main
import (
"fmt"
"time"
)
func main(){
day := time.Now().Weekday()
fmt.Printf("Hello,%s (%d)\n",day,day)
}
如果今天是周日,它将输出:
【30天30个Golang程序学习(一)(格式化输出)】Hello,Sunday (0)
以上程序在golang1.5.1 + ubuntu 15.10下调试通过。
个人微博:http://weibo.com/514860125
推荐阅读
- 30天健身笔记(45)
- 三门问题(蒙提霍尔悖论)分析与Golang模拟
- 【V课会】第3季-30天小学思维导图实战营
- 2021-05-06节俭生活第30天,活得不如一条狗通透
- golang锁竞争性能
- 用了30天整理的一些GO语言学习资料,2019请你加油
- 【都市】生日|【都市】生日 [01] 【87】 一鸣30天中篇小说挑战营第二期
- 90天30个TED演讲|90天30个TED演讲 - Day 25: How to get your ideas to spread
- 2020如何做好小程序直播(你需要的30个直播运营技巧!)
- 《为什么参加30天听书稿写作训练营(》)