func TestT(t *testing.T) {
b := byte{123, 34, 115, 116, 97, 116, 101, 34, 58, 116, 114, 117, 101, 44, 34, 109, 101, 115, 115, 97, 103, 101, 34, 58, 34, 115, 117, 99, 99, 101, 115, 115, 34, 44, 34, 100, 97, 116, 97, 34, 58, 123, 34, 116, 105, 109, 101, 34, 58, 48, 46, 53, 51, 50, 57, 44, 34, 116, 111, 116, 97, 108, 34, 58, 51, 44, 34, 112, 97, 103, 101, 67, 111, 117, 110, 116, 34, 58, 49, 44, 34, 112, 97, 103, 101, 34, 58, 49, 44, 34, 108, 105, 109, 105, 116, 34, 58, 49, 48, 44, 34, 100, 111, 99, 117, 109, 101, 110, 116, 115, 34, 58, 91, 123, 34, 105, 100, 34, 58, 57, 44, 34, 116, 101, 120, 116, 34, 58, 34, 232, 139, 185, 230, 158, 156, 229, 146, 140, 230, 169, 153, 229, 173, 144, 229, 150, 156, 230, 172, 162, 229, 144, 131, 230, 136, 145, 34, 44, 34, 100, 111, 99, 117, 109, 101, 110, 116, 34, 58, 123, 34, 116, 101, 115, 116, 34, 58, 34, 116, 34, 125, 44, 34, 115, 99, 111, 114, 101, 34, 58, 49, 44, 34, 107, 101, 121, 115, 34, 58, 91, 34, 232, 139, 185, 230, 158, 156, 34, 44, 34, 229, 146, 140, 34, 44, 34, 230, 169, 153, 229, 173, 144, 34, 44, 34, 229, 150, 156, 230, 172, 162, 34, 44, 34, 229, 144, 131, 34, 44, 34, 230, 136, 145, 34, 93, 125, 44, 123, 34, 105, 100, 34, 58, 56, 44, 34, 116, 101, 120, 116, 34, 58, 34, 230, 136, 145, 229, 150, 156, 230, 172, 162, 229, 144, 131, 232, 139, 185, 230, 158, 156, 229, 146, 140, 230, 169, 153, 229, 173, 144, 34, 44, 34, 100, 111, 99, 117, 109, 101, 110, 116, 34, 58, 123, 34, 116, 101, 115, 116, 34, 58, 34, 116, 34, 125, 44, 34, 115, 99, 111, 114, 101, 34, 58, 49, 44, 34, 107, 101, 121, 115, 34, 58, 91, 34, 230, 136, 145, 34, 44, 34, 229, 150, 156, 230, 172, 162, 34, 44, 34, 229, 144, 131, 34, 44, 34, 232, 139, 185, 230, 158, 156, 34, 44, 34, 229, 146, 140, 34, 44, 34, 230, 169, 153, 229, 173, 144, 34, 93, 125, 44, 123, 34, 105, 100, 34, 58, 55, 44, 34, 116, 101, 120, 116, 34, 58, 34, 230, 136, 145, 229, 150, 156, 230, 172, 162, 229, 144, 131, 232, 139, 185, 230, 158, 156, 229, 146, 140, 233, 166, 153, 232, 149, 137, 34, 44, 34, 100, 111, 99, 117, 109, 101, 110, 116, 34, 58, 123, 34, 116, 101, 115, 116, 34, 58, 34, 116, 34, 125, 44, 34, 115, 99, 111, 114, 101, 34, 58, 49, 44, 34, 107, 101, 121, 115, 34, 58, 91, 34, 230, 136, 145, 34, 44, 34, 229, 150, 156, 230, 172, 162, 34, 44, 34, 229, 144, 131, 34, 44, 34, 232, 139, 185, 230, 158, 156, 34, 44, 34, 229, 146, 140, 34, 44, 34, 233, 166, 153, 232, 149, 137, 34, 93, 125, 93, 44, 34, 119, 111, 114, 100, 115, 34, 58, 91, 34, 232, 139, 185, 230, 158, 156, 34, 93, 125, 125}
bs := string(b)
_ = bs
fmt.Printf(“%s”, bs)
log.Println("DONE")
}
debug下拿到的bs值: {“state”:true,“message”:“success”,“data”:{“time”:0.5329,“total”:3,“pageCount”:1,“page”:1,“limit”:10,“documents”:[{“id”:9,“text”:“苹果和橙子喜欢吃我”,“document”:{“test”:“t”},“score”:1,“keys”:[“苹果”,“和”,“橙子”,“喜欢”,“吃”,“我”]},{“id”:8,“text”:“我喜欢吃苹果和橙子”,“document”:{“test”:“t”},“score”:1,“keys”:[“我”,“喜欢”,“吃”,“苹果”,“和”,“橙子”]},{“id”:7,“text”:“我喜欢吃苹果和香蕉”,“document”:{“test”:“t”},“score”:1,“keys”:[“我”,“喜欢”,“吃”,“苹果”,“和”,“香蕉”]}],“words”:[“苹果”]}}
fmt和log的println(string(b))或者其他形式打印字符串都会导致程序无提示退出,没有任何panic或者exit之类的
2024/07/24 11:01:49 {{http://127.0.0.1:5678} 0xc000020d20}
=== RUN TestT