摘要: 一、创建索引语句差异 1.1 普通索引 ALTER TABLE `tt_test` ADD INDEX `k_title` (`title`) USING BTREE ; 1.2 唯一索引 ALTER TABLE `tt_test` ADD UNIQUE INDEX `un_index_title` 阅读全文
posted @ 2021-01-13 18:16 Black_Climber 阅读(521) 评论(0) 推荐(0) 编辑
摘要: viper v := viper.New() v.SetConfigType("yaml") v.SetConfigName("conf") v.AddConfigPath("./conf") if err := v.ReadInConfig(); err != nil{ fmt.Println(" 阅读全文
posted @ 2021-01-13 14:01 Black_Climber 阅读(485) 评论(0) 推荐(0) 编辑
摘要: runtime.goexit() 只是退出当前的goroutinue os.exit()会退出主进程 package main import ( "fmt" "os" "runtime" "sync" "time" ) var wg sync.WaitGroup func testFunc1(wg 阅读全文
posted @ 2021-01-13 10:31 Black_Climber 阅读(596) 评论(0) 推荐(0) 编辑