12 2021 档案
摘要:导出: mapping和data docker run --rm -ti -v /data:/tmp taskrabbit/elasticsearch-dump \ --input=http://10.33.0.20:9200/my-index \ --output=/tmp/my_index_ma
阅读全文
摘要:1.报错原因 /usr/local/rocketmq/bin/runserver.sh: 70: [[: not found Unrecognized option: -Xlog:gc*:file=/dev/shm/rmq_srv_gc_%p_%t.log:time,tags:filecount=5
阅读全文
摘要:1.读文件 package main import ( "bufio" "fmt" "io" "os" ) //go去读文件内容 func ReadAll(filePth string) string{ file, err := os.Open(filePth) defer file.Close()
阅读全文
摘要:// float 保留2位小数 func Decimal(value float64) float64 { value, _ = strconv.ParseFloat(fmt.Sprintf("%.2f", value), 64) return value } //fload64 --> strin
阅读全文
摘要:1.打印前一天的时间 package main import ( "fmt" "time" ) func main() { timeObj := time.Now() yesTime := timeObj.AddDate(0,0,-1) //时间戳格式化 //var timeFlag1 = time
阅读全文
摘要:package main import "fmt" func main() { n := 2 sInt := fmt.Sprintf("%02d", n) fmt.Println(sInt) }
阅读全文