* 数据来源:leveldb数据库
* goroutine-1: generate() 从leveldb数据库中取数据,以DBdata结构体形式存入dbchan(channel)
* goroutine-2: printchan() 从dbchan取数据,打印显示
**问题:** 比较存入dbchan 和从dbchan 取出的数据,结果不一样!!! 但如果以string形式存入dbchan,取出的数据却是一致的。实在是搞迷糊了,请大佬指教,先谢谢了!
**上代码** (chainstate数据文件可在https://github.com/mickeystone/golang-channel-test 下载)
```
package main
import (
"encoding/hex"
"sync"
"github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/opt"
"fmt"
)
// 自定义结构体
type DBdata struct {
key []byte
value []byte
obfuscateKey []byte
}
var chainstate = "./chainstate"
var dbchan = make(chan DBdata, 10)
func generate(wg *sync.WaitGroup){
opts := &opt.Options{
Compression: opt.NoCompression,
}
db, _ := leveldb.OpenFile(chainstate, opts) // You have got to dereference the pointer to get the actual value
defer db.Close()
iter := db.NewIterator(nil, nil)
var obfuscateKey []byte
for iter.Next() {
key := iter.Key()
value := iter.Value()
prefix := key[0]
if prefix == 14 { // 14 = obfuscateKey
obfuscateKey = value
}
if prefix == 67 {
temp := DBdata{key, value, obfuscateKey}
dbchan <- temp
//fmt.Println(hex.EncodeToString(key), hex.EncodeToString(value))
}
}
close(dbchan)
iter.Release()
wg.Done()
}
func printchan(wg *sync.WaitGroup) {
n := 1
for x:= range dbchan {
fmt.Println(n, hex.EncodeToString(x.key), hex.EncodeToString(x.value))
n += 1
}
wg.Done()
}
func main() {
wg := sync.WaitGroup{}
wg.Add(1)
go generate(&wg)
wg.Add(1)
go printchan(&wg)
wg.Wait()
}
```
## 比较结果:
![image.png](https://static.studygolang.com/210525/78b468a1a8f2cca701c7dea68293454e.png)
## generate() 存入数据
```
1 430201df27519bd574817d5449758f744e42d648415d1370b17ac6448b6ccc9cfe00
2 4302946a80f855fa6e59264de3b84da0ce975ab6d0806a90288bb2cb7f4e782b2000
3 430743ebb1940fb72a15cebc9dbe481ea7625c70790a56bedfb7d74e0ba822788000
4 430913281db730c5cff987146330508c88cc3e642d1b9f5154854764fd547e0a5400
5 4309ae88a66180549143c5ab25014dba8b985672f1806827a4f4b5f9778cef44b900
6 430d080260d107d269ccba9247cfc64c952f1d13514b49e9f1230b3a197a8b745000
7 430d50983d860884a1414e78d728e30106ac7787018c1ca53ef29555551486640800
8 430e7dcba835e4c20485b614f252183b53921a8901049ea6ef22f09a42195601b500
9 431012aaab3e3bffd34055aaa157bf78792d5c18f085635eda7046d89c08a0eabd00
10 43112ba175a1e04b14ba9e7ea5f76ab640affeef5ec98173ac9799a852fa39add300
11 431567e4c48479995636794ce5ec794eb145c1194478f45bb0a45cc11d8cc27fb100
12 4316f949e36753aeb0e437fdbbaaefe5a40aa4960e215a1e3adebc0bf787bd524500
13 431763035d50efa2bcefe978118171858f930994578cbe46d39a19ef0deb14b02e00
14 431d01af6c4716b28de4e5e3385a5846bac1fa90a565579065d904b354da4f876500
15 431d2e4b642f3d14c24f57f237d38acb8e4939855a8ca6ce7dab48e2cd85843d9a00
16 43201e1ad44f0ae957771d2e60fa252594e7fcc75a51db4cdfb5fbaeb38612390400
17 4321184d335529aae22259315be42915b0360deeae97ec428a654014a3d2899ca000
18 4323ca63b851cadfd7099ae68eb22147d09394adb72a78e86b69c42deb6df225f900
19 432518bddd47990bc127da5579b114cc3976568c7d0fc8f5b7a4b90478076799fb00
20 4326366720a786e6615b3203909f8df77fc2e96d1afe593bd3d9623d19c481c94700
21 43282c9db8313817b4835efab229872eae2b8b5011c2e90ed14e57192984da062300
22 432837870b786929d9e30d651dcda7c3006a04b79d292261031a4235328b0f0fbc00
23 4328ab6cc3287a5ec4f7a4d787a99e5cae6ec7d72e7307551097e949e9aab1310500
24 432d00540fb7aa5cf6fefc567912eeef891a19ac2f9fc055eafd229b1a73e1a18200
25 432d5f16b75aedef22d1331a6ef93329b3a1a3eb453564c93862fb6386b996b88100
26 4330b2b4faab68a1669e4eda67442919f25561f8df26237de4760425433f7f00a300
27 4330e2a3e32abf1663a854efbef1b233c67c8cdcef5656fe3b4f28e52112469e9b00
28 4331534f7571b5ea98c1318eed04937d6ff16582ba72c53552581c40828b6ce2f500
29 433658f907b55bf0e46ac560d0cd6ebb1d141c311c00193ad69a98b4f6b9b6b87000
30 4336ba73991a7ac5d0a454e2e019e237d3b1e4838de39b93207ee2b0cc5bbf009200
31 43379dfb96a5ea8c81700ea4ac6b97ae9a9312b2d4301a29580e924ee6761a252000
32 4339359e15c0251a9162151f681d2b23c71e734595db271846aeed8736c2ef443f00
33 433e75f63c634ed5fb3d8e21de5fe143cfa63c8018fce0fa26cbc628378b9bc34300
34 433f674005103b42f984169c7d008370967e91920a6a5d64fd51282f75bc73a68a00
35 43406468307c915485a9c9eabe31cc853e68311176e07e71475c3e26888fb7b7ed00
36 434206fdefe7da3b2c5cb0c8dbb12d834ef3ac8d6e2c68050eb716babe95f4169d00
37 434349d6a4e94f05a736ac830754e76dfdf7f140c331f316d1a278517e1daf2e9e00
38 43442ee91b2b999fb15d61f6a88ecf2988e9c8ed48f002476128e670d3dac19fe700
39 43448490d4ce520ae01c822d2f2b489a3b2805416c21b558cf99cd1dfa1e29a8b000
40 4344f672226090d85db9a9f2fbfe5f0f9609b387af7be5b7fbb7a1767c831c9e9900
41 43474fbb76278470f31077953b66d0ce967e1b3e2e3a4041553b82cd3fe1a2cb5a00
42 4348b6a7bcf2a59e336da83ee70ddd230fc7e2db16c3c2654494c5502dac01253800
43 4349935f8c517625d3560f23a3cdf82fef68779c99f4a92931c91d8c11517c5cf100
44 434a01544d614d0ceb34ad67b7bcbbb28000ba532067282fee211b36b9b6c8a9f200
45 434bb7d646fe8e6678ab8829cc899a89f256b6cf19dbddd494a773b057c374002400
46 434ca77b8b243eee32a9b06a8bea33abd5cf517bf68eed73e7fa951f4f30d2a17e00
47 434e8985a786d864f21e9cbb7cbdf4bc9265fe681b7a0893ac55a8e919ce035c2f00
48 434f08f5265053c96c4eb51eac4ad3f5c668323f4b630af32a66915eeee678f9b300
49 434f0c28db6791823456c979edc21f8e9615a037c410299a745f2e7af03cf3310700
50 4352fa7ddc59d3574bbf404011820e1e48cfbee2aa6e8f2f5b472bbfbfab874fe900
51 43560164b8bad7675061aa0f43ced718884bdd8528cae07f24c58bb69592d8afe100
52 43595badffff2bb1453255880ba0f33d7be62a2f55b6f266bc26869d2715974c1900
53 435a4d7d92cd839cdb7dc448902438e4a4885721487de33900b34558bd6f255dd000
54 435a8da000e1a2258630dd6f0286ddc24b7b0ef897f3447138c9a3ccb8b36cfa9e00
55 435a92e14ed75457c0a01680433301e85dd78b7988e5dd9004c46d6d1712e1cb7100
56 435b7b25b51797f83192f9fd2c3871bfb27570a7d6b56d3a50760613d1a2fc1aee00
57 435d6291c35a88fd9a3aef5843124400936fbf2c9166314addcaf5678e55b7e0a300
58 435fafe0e1824bb9995f12eeb4183eaa1fde889f4590191cd63a92a61a1eee9a4300
59 43654f005a6e4b4b57b42343fb0e47f32079b4ebfe643c2ea4ea20e46c3af00c2300
60 43660802c98f18fd34fd16d61c63cf447568370124ac5f3be626c2e1c3c9f0052d00
61 43668b636991dd0638ddb442ee2b10e3184d87e2d059a43076e10512af8814d3d000
62 43671df2bb3376bb03ff686d80d2ffc4794cd7f720b49c9e6e09f494743dc984c100
63 4368087c53b8717afb90c642f009b8fb9b490e8215e242737f36adaa0690c0973700
64 43689a44cb1c69d8aade6a37d48322b3e97099c25e4bcb228a9dd2739febda90e600
65 4369a57920735cf77470917d6ddb01a83fe26fd9bcd71a360443c08d4d2d59a43300
66 436ac9cb0d762ee58fba505cf59b6d36f2e82ed40cfe19f1016cff52eb7ae34f0d00
67 436bcae7125656cc0d6b3dc563ab3e98d5496dcbd89785095138b143a48bc1841400
68 436de50306437d27771ba99ef09fda4941a6c6c6a9c86e0743b4daea0756c082a000
69 436e06373c80de397406dc3d19c90d71d230058d28293614ea58d6a57f8f5d32f800
70 436f6168c5809c18ab102a28087ed22a5aac41e5c531b39b8a0975ebaf1fc044ae00
71 4371b22998921efddf90c75ac3151cacee8f8084d3e9cb64332427ec04c7d5629900
72 4373cad1e2d193f0d27471b13eb4b1f356aa63de8dc78a58a9128a2115c6eb1e5600
73 43743a0389e4d8c9f60ad41025b797fd25e228123c4b54b5df20ed02ca97781df000
74 4374549b3151d6dd4ce77419d01710921b3211ed3280bf2e3af2c1f1a820063b2200
75 437a06ea98cd40ba2e3288262b28638cec5337c1456aaf5eedc8e9e5a20f062bdf00
76 437c23a96d8cf18a918a19e68c5fee3454b5d09ec88b1f63b6c906685495027bca00
77 437d282068b770b35b587a9fb4356491d5854bba3b60d7c1a129d37ed6b54e346d00
78 4380ee9dbb0f58c4e12269383c9735abb1c6f03065f40d5238ec6c3e5fec3a881800
79 4382232ac15c8d8642df8827fe5e3a297a758447f00c1ee9e51b2e578b22c5e59700
80 4383e4f8a9d502ed0c419075c1abb5d56f878a2e9079e5612bfb76a2dc37d9c42700
81 438a15f1ddaef05f8acb0db86b2f4534f68d417f05de65a64073c3d0b7e0eded3200
82 438ac11bbf709fd20c4a6adc39dc9827402a4df48149090c38bfa393f20deca65500
83 438c4cc1b42c9dab1973890ecdfdee032079ed39892ad53a6546844d237634cfe100
84 438e27364c36456cfac6156408768d45af49a465f35aae702bc48ce63f97401b6100
85 4390162a9c64459060f320a51253378106c6472a23a9dcd90588f0cc09d00d4dcc00
86 43905498df05eed30ba5bb145df31e8b185e947fcfd3b4f4b15a5623af5aa7263200
87 4395ca77f0c5dfd190be1eab32399d93555666cdadb8f44eb0636a608414b10d3c00
88 43974ea41630fe3addd397cec0f06ee4aae825f9c2d6d789b082d5f2c646e2a3e700
89 43982051fd1e4ba744bbbe680e1fee14677ba1a3c3540bf7b1cdb606e857233e0e00
90 4399add42809e35d9c89641de1e9497db2e70bbb283e9b9492599f879533654c5c00
91 43a4d66fc5b10430fcfd14558e63d19b649a61ee95b71b1bcce948b1d53583dbeb00
92 43a4e0c85f9b755b1611de231958c1d7ddf51186095a5ac3d9dee1b1d78594d53e00
93 43a683374124eb823197b4caab534ac172d7da016d06e35ab5465fa883f7b69c4200
94 43a9be635b8f87de2c48a738f3e8201f3353c2044d05f44f9aabc4a59c6905865c00
95 43ad1e219b43cca3ca0cdc2f17cab1a4b34a681eb17175916aa2dcee017011383400
96 43b41092b870cc096070ff3212c207c0881e3a2abafc1b92507941b4ef705917e000
97 43b45cf14a7caeeb5fcb286d314ac2fa85f58df3d5156fa95c832f373930de9bc300
98 43b4ff4753f29de2ec4aefcccbb72b113f820894587fb3b7e0218ca6cb648cb44100
99 43b57076c0e5f498a6f06ef26c72e224cd7e25784ed6cd569e570988d5e59bdcd300
100 43b87adb107589f869ca344a457dec051371352b2f38be825d914139b568305faa00
101 43b8c8754fabb0ffeb04ca263a1368c39c059ca0d4af3151b876f27e197ebb963b00
102 43b9253cf4f366a018182bab5a30a54c700db0736b540e3ad16fc1a109a81929b500
103 43ba98b85bb12baeffda12c2d2263a701e572219f3c93972e17c07b2aa71cea47300
104 43bcfed99e7c1771baa0582d46dba9c84268a31f9023c259a0b9027171e1a69a5f00
105 43bdaed84e0cbab735880d4763a1eb2df1ecd59dc261f3446db37bed5b6ccb99f300
106 43be2123ad48038313b8b726a51cb080bb5a8b81c4166401493b017d2d33520f9b00
107 43be23d982899e45eb4f5095cbc1c43ddc9495e93fd1e4f0bb3a20fd461412c5bd00
108 43be4544845044c67df65f37d0ba8bb323fe457c141abe38eecdc2e530144bfb8100
109 43bea5824628bd47b2edeb32cb6a46225a2b74c498a9fd4c5077bb259ffa381f9a00
110 43c07d8b31b161830db5f6198d8933bba12c985618b18fcd6291acb4c2d8d82c8f00
111 43c28142c6baf94b86be7c50af14abe462faa489979826773ff4a932a299cf514400
112 43c654ae2f49a83f60d62dfafca02a221c9cb45ad96a5cb1539b22077bfa87d25e00
113 43c6752761b3f3db282dff2e4c43d1e44830dd42daf448f0398c2511925ccc949f00
114 43c780aae409a4f0992ffad17806e5f339c7b641cbc8562c04fd7319fc835edeab00
115 43c8196e93d912864d817e2a81e07f7cb1a026e3fa5ca80b4c1e1e55bfed4a612800
116 43c87ac7e967e3b09e53e4bb31d4d9306465bd8500061c1819b15d451b46bdc95b00
117 43c997a5e56e104102fa209c6a852dd90660a20b2d9c352423edce25857fcd370400
118 43c9c0fd0ae7b7973c42fc9e3dddc967b6e309570b720ff15414c08365f005992b00
119 43ca3fae9a5bdd728abb0b3e1953a589d945448dd452331c0199e3dc2b1c5935cb00
120 43ca7e0cb6eb209f2b422bc3c764e25c656065027dfd60224ee448d12c57fa74b700
121 43cb527bd29495c02c9d6515de91ef264df333447e48ef730f3b66ffa8db3eb38600
122 43cb537ad225f53bdcc69762c164492dc692e190ee3098cf933f82597350982b8800
123 43cb9f33326bbf60634a0634c3bce1c4a7e43ac4bd3fe54a654ae35be3f6ac83fd00
124 43ce3465d7e5317988c75a41ea862dc489918005c3d90f7e4590ab3ac04dc1836e00
125 43ceefaf23adb1009753545c230a374c48851676ccb7d6f004b66dd302ceb5443b00
126 43d46520bf3888d22e5fe5e3b42a90b7aac299b95fb494b7918fb4bc117c79c83100
127 43d5273768443e9e48d86acc6a1c5fc3925e69d64f11aa17297c1c16e6e339960e00
128 43d5fdcc541e25de1c7a5addedf24858b8bb665c9f36ef744ee42c316022c90f9b00
129 43d6be02040ee5f8e52f2e925e6f70c73196064f99f20090bc73ea71516c5472d400
130 43d8855c4002ac58a052b1ad12af7179fecf988893093528f2a457beb5fb6b715f00
131 43d9a6665d16cf43ec412e38aef57098c9b5ff613bfefc1ceaa1781e5f087897f600
132 43d9a7f8d838220becec1802eec1430b4769d6b4699eb95fecb7d1d5c86e6613d800
133 43dc1490b5ba227b1adbb2513f74e0252e8fe68b6c7de74c1a22adb63b14e8c16700
134 43dc3ebd22794574257ffbfd27b91a86dd7012b2ed308f406523074da63465cccb00
135 43e0af3bba9e962ce288d9e232d28a1ba9c85bd1e298890738a65b93ed97192b8500
136 43e11c48fecdd9e72510ca84f023370c9a38bf91ac5cae88019bee94d24528526300
137 43e19a9f3635b503e037212f13f6dd2b40a6b2d81379b9b341df3e33c14c22a3de00
138 43e1ac834e2c6e79465b2fd284f7ca1feda75d155a88ff8bd2b9c1113c4120480a00
139 43e1e5c48a2c1e53c4db2764dc5bab527232d2d31f476240b39e567e256c26902100
140 43e1fe31bd4e94cd3a004849125ac5951703d34b33f3a90ca1ddc67ae4f8ed6eae00
141 43e3855ed886605b6d4a99d5fa2ef2e9b0b164e63df3c4136bebf2d0dac0f1f7a600
142 43e43721163a2bdbc80493a9e0b65d20b1ce63ec4c5ffadc39ea01e13d4e05359600
143 43e4a9a2663a445292d046b21dfb56c59abb24b9af231b4913bcf6cdd45eb81b0f00
144 43ec77d34cb2f84f3447c37ec1b4476e044e88478378998bd55d031f58f4e261c300
145 43ede29e76449491b0e2b766dc213c0e15bd7ab6eae48a7cb399c22a48621c521900
146 43eea3f31766c62e47ca1e9ccd303e37404887a570375079fa030b3e036ce71c7000
147 43efdb9fea5b31617d311cd69f6f54fc938c6d0da6f659d1fab97f84c9d9b637d600
148 43f01258747019514aa5c475cddd59a309347280ead98d19d8df8f9f99eb56757900
149 43f1c9801d5e85c29842c8e5aeaf83a0786ef952c19d0d0bee33f78e629e843b5000
150 43f38b91a939e7f81483f88ffcf3da8607fd928a093746a03b5eb4964ae0a4d28800
151 43f54667bee8511d31bb173bcc6f15b0bf3dc42788a813439bfea9065f90586f3c00
152 43f5e6a6e8945968936187c5bcfbcd35db4c259198b38779e494938d18fc5ed64100
153 43f6ef70bb4846dffdefb6daa75c87d7021f01d7ed0590fb9d040993609c9c7bd100
154 43f7a5d0816883ec2f4d237082b47b4d3a6a26549d65ac50d8527b67ab4cb7e6cf00
155 43f91fc47ead0859d5f3f8a33f73fd64abd16a21a3b96ef48d52e893741499969a00
156 43fa2fb24edda69806924fe1ef06bd073264d8b32f55eeaacab45a156563d0d4dd00
157 43fb4361f015fd0ba2b6d7baf685f0cf6eacf1397f84b2744ff063e63ce76ebfbb00
158 43fc2bd82cfc026bb9594f5e92e7aae7f0c5750e6e7d8dd73812bc1fff792d271200
159 43fe0c90dd69f7661425eebf7c913f0dd932691f3b1e3741105dd3600b69b9a9a000
160 43ff7ec13a3709b78b7a29035e7c10fa4363afae9d786e2a7ca497db08cc07d93800
```
## printchan() 取出数据
```
1 4316f949e36753aeb0e437fdbbaaefe5a40aa4960e215a1e3adebc0bf787bd524500
2 4316f949e36753aeb0e437fdbbaaefe5a40aa4960e215a1e3adebc0bf787bd524500
3 431763035d50efa2bcefe978118171858f930994578cbe46d39a19ef0deb14b02e00
4 431d01af6c4716b28de4e5e3385a5846bac1fa90a565579065d904b354da4f876500
5 431d2e4b642f3d14c24f57f237d38acb8e4939855a8ca6ce7dab48e2cd85843d9a00
6 43201e1ad44f0ae957771d2e60fa252594e7fcc75a51db4cdfb5fbaeb38612390400
7 4321184d335529aae22259315be42915b0360deeae97ec428a654014a3d2899ca000
8 4323ca63b851cadfd7099ae68eb22147d09394adb72a78e86b69c42deb6df225f900
9 432518bddd47990bc127da5579b114cc3976568c7d0fc8f5b7a4b90478076799fb00
10 4326366720a786e6615b3203909f8df77fc2e96d1afe593bd3d9623d19c481c94700
11 43282c9db8313817b4835efab229872eae2b8b5011c2e90ed14e57192984da062300
12 432837870b786929d9e30d651dcda7c3006a04b79d292261031a4235328b0f0fbc00
13 4328ab6cc3287a5ec4f7a4d787a99e5cae6ec7d72e7307551097e949e9aab1310500
14 432d00540fb7aa5cf6fefc567912eeef891a19ac2f9fc055eafd229b1a73e1a18200
15 432d5f16b75aedef22d1331a6ef93329b3a1a3eb453564c93862fb6386b996b88100
16 4330b2b4faab68a1669e4eda67442919f25561f8df26237de4760425433f7f00a300
17 4330e2a3e32abf1663a854efbef1b233c67c8cdcef5656fe3b4f28e52112469e9b00
18 4331534f7571b5ea98c1318eed04937d6ff16582ba72c53552581c40828b6ce2f500
19 433658f907b55bf0e46ac560d0cd6ebb1d141c311c00193ad69a98b4f6b9b6b87000
20 4336ba73991a7ac5d0a454e2e019e237d3b1e4838de39b93207ee2b0cc5bbf009200
21 43379dfb96a5ea8c81700ea4ac6b97ae9a9312b2d4301a29580e924ee6761a252000
22 4339359e15c0251a9162151f681d2b23c71e734595db271846aeed8736c2ef443f00
23 433e75f63c634ed5fb3d8e21de5fe143cfa63c8018fce0fa26cbc628378b9bc34300
24 433f674005103b42f984169c7d008370967e91920a6a5d64fd51282f75bc73a68a00
25 43406468307c915485a9c9eabe31cc853e68311176e07e71475c3e26888fb7b7ed00
26 434206fdefe7da3b2c5cb0c8dbb12d834ef3ac8d6e2c68050eb716babe95f4169d00
27 434349d6a4e94f05a736ac830754e76dfdf7f140c331f316d1a278517e1daf2e9e00
28 43442ee91b2b999fb15d61f6a88ecf2988e9c8ed48f002476128e670d3dac19fe700
29 43448490d4ce520ae01c822d2f2b489a3b2805416c21b558cf99cd1dfa1e29a8b000
30 4344f672226090d85db9a9f2fbfe5f0f9609b387af7be5b7fbb7a1767c831c9e9900
31 43474fbb76278470f31077953b66d0ce967e1b3e2e3a4041553b82cd3fe1a2cb5a00
32 4348b6a7bcf2a59e336da83ee70ddd230fc7e2db16c3c2654494c5502dac01253800
33 4349935f8c517625d3560f23a3cdf82fef68779c99f4a92931c91d8c11517c5cf100
34 434a01544d614d0ceb34ad67b7bcbbb28000ba532067282fee211b36b9b6c8a9f200
35 434bb7d646fe8e6678ab8829cc899a89f256b6cf19dbddd494a773b057c374002400
36 434ca77b8b243eee32a9b06a8bea33abd5cf517bf68eed73e7fa951f4f30d2a17e00
37 434e8985a786d864f21e9cbb7cbdf4bc9265fe681b7a0893ac55a8e919ce035c2f00
38 434f08f5265053c96c4eb51eac4ad3f5c668323f4b630af32a66915eeee678f9b300
39 434f0c28db6791823456c979edc21f8e9615a037c410299a745f2e7af03cf3310700
40 4352fa7ddc59d3574bbf404011820e1e48cfbee2aa6e8f2f5b472bbfbfab874fe900
41 43560164b8bad7675061aa0f43ced718884bdd8528cae07f24c58bb69592d8afe100
42 43595badffff2bb1453255880ba0f33d7be62a2f55b6f266bc26869d2715974c1900
43 435a4d7d92cd839cdb7dc448902438e4a4885721487de33900b34558bd6f255dd000
44 435a8da000e1a2258630dd6f0286ddc24b7b0ef897f3447138c9a3ccb8b36cfa9e00
45 435a92e14ed75457c0a01680433301e85dd78b7988e5dd9004c46d6d1712e1cb7100
46 435b7b25b51797f83192f9fd2c3871bfb27570a7d6b56d3a50760613d1a2fc1aee00
47 435d6291c35a88fd9a3aef5843124400936fbf2c9166314addcaf5678e55b7e0a300
48 435fafe0e1824bb9995f12eeb4183eaa1fde889f4590191cd63a92a61a1eee9a4300
49 43654f005a6e4b4b57b42343fb0e47f32079b4ebfe643c2ea4ea20e46c3af00c2300
50 43660802c98f18fd34fd16d61c63cf447568370124ac5f3be626c2e1c3c9f0052d00
51 43668b636991dd0638ddb442ee2b10e3184d87e2d059a43076e10512af8814d3d000
52 43671df2bb3376bb03ff686d80d2ffc4794cd7f720b49c9e6e09f494743dc984c100
53 4368087c53b8717afb90c642f009b8fb9b490e8215e242737f36adaa0690c0973700
54 43689a44cb1c69d8aade6a37d48322b3e97099c25e4bcb228a9dd2739febda90e600
55 4369a57920735cf77470917d6ddb01a83fe26fd9bcd71a360443c08d4d2d59a43300
56 436ac9cb0d762ee58fba505cf59b6d36f2e82ed40cfe19f1016cff52eb7ae34f0d00
57 436bcae7125656cc0d6b3dc563ab3e98d5496dcbd89785095138b143a48bc1841400
58 436de50306437d27771ba99ef09fda4941a6c6c6a9c86e0743b4daea0756c082a000
59 436e06373c80de397406dc3d19c90d71d230058d28293614ea58d6a57f8f5d32f800
60 436f6168c5809c18ab102a28087ed22a5aac41e5c531b39b8a0975ebaf1fc044ae00
61 4371b22998921efddf90c75ac3151cacee8f8084d3e9cb64332427ec04c7d5629900
62 4373cad1e2d193f0d27471b13eb4b1f356aa63de8dc78a58a9128a2115c6eb1e5600
63 43743a0389e4d8c9f60ad41025b797fd25e228123c4b54b5df20ed02ca97781df000
64 4374549b3151d6dd4ce77419d01710921b3211ed3280bf2e3af2c1f1a820063b2200
65 437a06ea98cd40ba2e3288262b28638cec5337c1456aaf5eedc8e9e5a20f062bdf00
66 437c23a96d8cf18a918a19e68c5fee3454b5d09ec88b1f63b6c906685495027bca00
67 437d282068b770b35b587a9fb4356491d5854bba3b60d7c1a129d37ed6b54e346d00
68 4380ee9dbb0f58c4e12269383c9735abb1c6f03065f40d5238ec6c3e5fec3a881800
69 4382232ac15c8d8642df8827fe5e3a297a758447f00c1ee9e51b2e578b22c5e59700
70 4383e4f8a9d502ed0c419075c1abb5d56f878a2e9079e5612bfb76a2dc37d9c42700
71 438a15f1ddaef05f8acb0db86b2f4534f68d417f05de65a64073c3d0b7e0eded3200
72 438ac11bbf709fd20c4a6adc39dc9827402a4df48149090c38bfa393f20deca65500
73 438c4cc1b42c9dab1973890ecdfdee032079ed39892ad53a6546844d237634cfe100
74 438e27364c36456cfac6156408768d45af49a465f35aae702bc48ce63f97401b6100
75 4390162a9c64459060f320a51253378106c6472a23a9dcd90588f0cc09d00d4dcc00
76 43905498df05eed30ba5bb145df31e8b185e947fcfd3b4f4b15a5623af5aa7263200
77 4395ca77f0c5dfd190be1eab32399d93555666cdadb8f44eb0636a608414b10d3c00
78 43974ea41630fe3addd397cec0f06ee4aae825f9c2d6d789b082d5f2c646e2a3e700
79 43982051fd1e4ba744bbbe680e1fee14677ba1a3c3540bf7b1cdb606e857233e0e00
80 4399add42809e35d9c89641de1e9497db2e70bbb283e9b9492599f879533654c5c00
81 43a4d66fc5b10430fcfd14558e63d19b649a61ee95b71b1bcce948b1d53583dbeb00
82 43a4e0c85f9b755b1611de231958c1d7ddf51186095a5ac3d9dee1b1d78594d53e00
83 43a683374124eb823197b4caab534ac172d7da016d06e35ab5465fa883f7b69c4200
84 43a9be635b8f87de2c48a738f3e8201f3353c2044d05f44f9aabc4a59c6905865c00
85 43ad1e219b43cca3ca0cdc2f17cab1a4b34a681eb17175916aa2dcee017011383400
86 43b41092b870cc096070ff3212c207c0881e3a2abafc1b92507941b4ef705917e000
87 43b45cf14a7caeeb5fcb286d314ac2fa85f58df3d5156fa95c832f373930de9bc300
88 43b4ff4753f29de2ec4aefcccbb72b113f820894587fb3b7e0218ca6cb648cb44100
89 43b57076c0e5f498a6f06ef26c72e224cd7e25784ed6cd569e570988d5e59bdcd300
90 43b87adb107589f869ca344a457dec051371352b2f38be825d914139b568305faa00
91 43b8c8754fabb0ffeb04ca263a1368c39c059ca0d4af3151b876f27e197ebb963b00
92 43b9253cf4f366a018182bab5a30a54c700db0736b540e3ad16fc1a109a81929b500
93 43ba98b85bb12baeffda12c2d2263a701e572219f3c93972e17c07b2aa71cea47300
94 43bcfed99e7c1771baa0582d46dba9c84268a31f9023c259a0b9027171e1a69a5f00
95 43bdaed84e0cbab735880d4763a1eb2df1ecd59dc261f3446db37bed5b6ccb99f300
96 43be2123ad48038313b8b726a51cb080bb5a8b81c4166401493b017d2d33520f9b00
97 43be23d982899e45eb4f5095cbc1c43ddc9495e93fd1e4f0bb3a20fd461412c5bd00
98 43be4544845044c67df65f37d0ba8bb323fe457c141abe38eecdc2e530144bfb8100
99 43bea5824628bd47b2edeb32cb6a46225a2b74c498a9fd4c5077bb259ffa381f9a00
100 43c07d8b31b161830db5f6198d8933bba12c985618b18fcd6291acb4c2d8d82c8f00
101 43c28142c6baf94b86be7c50af14abe462faa489979826773ff4a932a299cf514400
102 43c654ae2f49a83f60d62dfafca02a221c9cb45ad96a5cb1539b22077bfa87d25e00
103 43c6752761b3f3db282dff2e4c43d1e44830dd42daf448f0398c2511925ccc949f00
104 43c780aae409a4f0992ffad17806e5f339c7b641cbc8562c04fd7319fc835edeab00
105 43c8196e93d912864d817e2a81e07f7cb1a026e3fa5ca80b4c1e1e55bfed4a612800
106 43c87ac7e967e3b09e53e4bb31d4d9306465bd8500061c1819b15d451b46bdc95b00
107 43c997a5e56e104102fa209c6a852dd90660a20b2d9c352423edce25857fcd370400
108 43c9c0fd0ae7b7973c42fc9e3dddc967b6e309570b720ff15414c08365f005992b00
109 43ca3fae9a5bdd728abb0b3e1953a589d945448dd452331c0199e3dc2b1c5935cb00
110 43ca7e0cb6eb209f2b422bc3c764e25c656065027dfd60224ee448d12c57fa74b700
111 43cb527bd29495c02c9d6515de91ef264df333447e48ef730f3b66ffa8db3eb38600
112 43cb9f33326bbf60634a0634c3bce1c4a7e43ac4bd3fe54a654ae35be3f6ac83fd00
113 43cb9f33326bbf60634a0634c3bce1c4a7e43ac4bd3fe54a654ae35be3f6ac83fd00
114 43ce3465d7e5317988c75a41ea862dc489918005c3d90f7e4590ab3ac04dc1836e00
115 43ceefaf23adb1009753545c230a374c48851676ccb7d6f004b66dd302ceb5443b00
116 43d46520bf3888d22e5fe5e3b42a90b7aac299b95fb494b7918fb4bc117c79c83100
117 43d5273768443e9e48d86acc6a1c5fc3925e69d64f11aa17297c1c16e6e339960e00
118 43d5fdcc541e25de1c7a5addedf24858b8bb665c9f36ef744ee42c316022c90f9b00
119 43d6be02040ee5f8e52f2e925e6f70c73196064f99f20090bc73ea71516c5472d400
120 43d8855c4002ac58a052b1ad12af7179fecf988893093528f2a457beb5fb6b715f00
121 43d9a6665d16cf43ec412e38aef57098c9b5ff613bfefc1ceaa1781e5f087897f600
122 43d9a7f8d838220becec1802eec1430b4769d6b4699eb95fecb7d1d5c86e6613d800
123 43dc1490b5ba227b1adbb2513f74e0252e8fe68b6c7de74c1a22adb63b14e8c16700
124 43dc3ebd22794574257ffbfd27b91a86dd7012b2ed308f406523074da63465cccb00
125 43e0af3bba9e962ce288d9e232d28a1ba9c85bd1e298890738a65b93ed97192b8500
126 43e11c48fecdd9e72510ca84f023370c9a38bf91ac5cae88019bee94d24528526300
127 43e19a9f3635b503e037212f13f6dd2b40a6b2d81379b9b341df3e33c14c22a3de00
128 43e1ac834e2c6e79465b2fd284f7ca1feda75d155a88ff8bd2b9c1113c4120480a00
129 43e1e5c48a2c1e53c4db2764dc5bab527232d2d31f476240b39e567e256c26902100
130 43e1fe31bd4e94cd3a004849125ac5951703d34b33f3a90ca1ddc67ae4f8ed6eae00
131 43e3855ed886605b6d4a99d5fa2ef2e9b0b164e63df3c4136bebf2d0dac0f1f7a600
132 43e43721163a2bdbc80493a9e0b65d20b1ce63ec4c5ffadc39ea01e13d4e05359600
133 43e4a9a2663a445292d046b21dfb56c59abb24b9af231b4913bcf6cdd45eb81b0f00
134 43ec77d34cb2f84f3447c37ec1b4476e044e88478378998bd55d031f58f4e261c300
135 43ede29e76449491b0e2b766dc213c0e15bd7ab6eae48a7cb399c22a48621c521900
136 43eea3f31766c62e47ca1e9ccd303e37404887a570375079fa030b3e036ce71c7000
137 43efdb9fea5b31617d311cd69f6f54fc938c6d0da6f659d1fab97f84c9d9b637d600
138 43f01258747019514aa5c475cddd59a309347280ead98d19d8df8f9f99eb56757900
139 43f1c9801d5e85c29842c8e5aeaf83a0786ef952c19d0d0bee33f78e629e843b5000
140 43f38b91a939e7f81483f88ffcf3da8607fd928a093746a03b5eb4964ae0a4d28800
141 43f54667bee8511d31bb173bcc6f15b0bf3dc42788a813439bfea9065f90586f3c00
142 43f5e6a6e8945968936187c5bcfbcd35db4c259198b38779e494938d18fc5ed64100
143 43f6ef70bb4846dffdefb6daa75c87d7021f01d7ed0590fb9d040993609c9c7bd100
144 43f7a5d0816883ec2f4d237082b47b4d3a6a26549d65ac50d8527b67ab4cb7e6cf00
145 43f91fc47ead0859d5f3f8a33f73fd64abd16a21a3b96ef48d52e893741499969a00
146 43fa2fb24edda69806924fe1ef06bd073264d8b32f55eeaacab45a156563d0d4dd00
147 43fb4361f015fd0ba2b6d7baf685f0cf6eacf1397f84b2744ff063e63ce76ebfbb00
148 43fc2bd82cfc026bb9594f5e92e7aae7f0c5750e6e7d8dd73812bc1fff792d271200
149 43fe0c90dd69f7661425eebf7c913f0dd932691f3b1e3741105dd3600b69b9a9a000
150 43ff7ec13a3709b78b7a29035e7c10fa4363afae9d786e2a7ca497db08cc07d93800
151 48ff7ec13a3709b78b7a29035e7c10fa4363afae9d786e2a7ca497db08cc07d93800
152 48ff7ec13a3709b78b7a29035e7c10fa4363afae9d786e2a7ca497db08cc07d93800
153 48ff7ec13a3709b78b7a29035e7c10fa4363afae9d786e2a7ca497db08cc07d93800
154 48ff7ec13a3709b78b7a29035e7c10fa4363afae9d786e2a7ca497db08cc07d93800
155 48ff7ec13a3709b78b7a29035e7c10fa4363afae9d786e2a7ca497db08cc07d93800
156 48ff7ec13a3709b78b7a29035e7c10fa4363afae9d786e2a7ca497db08cc07d93800
157 48ff7ec13a3709b78b7a29035e7c10fa4363afae9d786e2a7ca497db08cc07d93800
158 48ff7ec13a3709b78b7a29035e7c10fa4363afae9d786e2a7ca497db08cc07d93800
159 48ff7ec13a3709b78b7a29035e7c10fa4363afae9d786e2a7ca497db08cc07d93800
160 48ff7ec13a3709b78b7a29035e7c10fa4363afae9d786e2a7ca497db08cc07d93800
```
更多评论
仔细看文档……
https://github.com/syndtr/goleveldb
// Remember that the contents of the returned slice should not be modified, and
// only valid until the next call to Next.
为了性能,很多kv db 都是这样的。
#2