39 lines
562 B
Go
39 lines
562 B
Go
/*
|
||
* @Description:
|
||
* @Version: 2.0
|
||
* @Autor: zhuyijun
|
||
* @Date: 2021-03-25 21:55:41
|
||
* @LastEditors: zhuyijun
|
||
* @LastEditTime: 2021-03-25 23:11:53
|
||
*/
|
||
package main
|
||
|
||
import (
|
||
"fmt"
|
||
"github.com/go-redis/redis"
|
||
)
|
||
func Prt() {
|
||
fmt.Print("nihao")
|
||
}
|
||
|
||
const (
|
||
// 可以在const()添加一个关键字iota,每行的iota都会累加,第一行的iota默认值为0
|
||
BEIJING = iota
|
||
SHANGHAI
|
||
SHENZHEN
|
||
)
|
||
|
||
const (
|
||
a,b = iota +1,iota+2
|
||
c,d
|
||
e,f
|
||
|
||
g,h = iota*2,iota*3
|
||
i,k
|
||
)
|
||
func main() {
|
||
fmt.Printf("nihaoya,%v \n", SHANGHAI)
|
||
fmt.Printf("nihaoya,%v \n", g)
|
||
}
|
||
|