In the client side, we use fmt.Sprintf("%08d", j) this format to represent "key", which is actually some thing like 1 0000001
But when we log things, we use "%v" and hex.EncodeToString to print key
log use "%v" format will be like 01 40 32 42 42 53 12 31
log use hex.EncodeToString will be like 31313131312
only if we use "log.Infof( "%s“, key ) it will be like 1 0000001, which is easy to understand
The inconsist format of "key" is disturbing in logging.
In the client side, we use
fmt.Sprintf("%08d", j)this format to represent "key", which is actually some thing like1 0000001But when we log things, we use
"%v"andhex.EncodeToStringto print keylog use
"%v"format will be like01 40 32 42 42 53 12 31log use
hex.EncodeToStringwill be like31313131312only if we use
"log.Infof( "%s“, key )it will be like1 0000001, which is easy to understandThe inconsist format of "key" is disturbing in logging.