-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
558 lines (324 loc) · 28 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>williamG</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta property="og:type" content="website">
<meta property="og:title" content="williamG">
<meta property="og:url" content="http://yoursite.com/index.html">
<meta property="og:site_name" content="williamG">
<meta property="og:locale" content="en_US">
<meta property="article:author" content="John Doe">
<meta name="twitter:card" content="summary">
<link rel="icon" href="/css/images/favicon.ico">
<link rel="stylesheet" href="/css/style.css">
<!-- baidu webmaster push -->
<script src='//zz.bdstatic.com/linksubmit/push.js'></script>
<meta name="generator" content="Hexo 4.2.0"></head>
<body class="home blog custom-background custom-font-enabled single-author">
<div id="page" class="hfeed site">
<header id="masthead" class="site-header" role="banner">
<hgroup>
<h1 class="site-title">
<a href="/" title="williamG" rel="home">williamG</a>
</h1>
<h2 class="site-description hitokoto"></h2>
<script type="text/javascript" src="https://v1.hitokoto.cn/?encode=js"></script>
</hgroup>
<nav id="site-navigation" class="main-navigation" role="navigation">
<button class="menu-toggle">菜单</button>
<a class="assistive-text" href="/#content" title="跳至内容">跳至内容</a><!--TODO-->
<div class="menu-main-container">
<ul id="menu-main" class="nav-menu">
<li class="menu-item menu-item-type-post_type menu-item-object-page"><a href="/">Home</a></li>
<li class="menu-item menu-item-type-post_type menu-item-object-page"><a href="/archives">Archives</a></li>
</ul>
</div>
</nav>
</header>
<div id="main" class="wrapper">
<div id="primary" class="site-content"><div id="content" role="main">
<article id="post-go2-type-parameters" class="post-go2-type-parameters post type-post status-publish format-standard hentry">
<!---->
<header class="entry-header">
<h1 class="entry-title">
<a class="article-title" href="/2020/07/13/go2-type-parameters/">go2_type_parameters</a>
</h1>
<div class="comments-link">
<a href="javascript:void(0);" data-url="http://yoursite.com/2020/07/13/go2-type-parameters/" data-id="ckcwb0tmm000qpcl08k3pd1fm" class="leave-reply bdsharebuttonbox" data-cmd="more"></a>
</div><!-- .comments-link -->
</header><!-- .entry-header -->
<div class="entry-content">
<p>2020/6/16,go团队发布了新的go泛型草案,用类型参数type parameters来限制或者说声明<br>对函数的传入参数的约束。</p>
<p>原文:<a href="https://go.googlesource.com/proposal/+/refs/heads/master/design/go2draft-type-parameters.md" target="_blank" rel="noopener">https://go.googlesource.com/proposal/+/refs/heads/master/design/go2draft-type-parameters.md</a><br>历史草案:<a href="https://go.googlesource.com/proposal/+/refs/heads/master/design/go2draft-contracts.md" target="_blank" rel="noopener">https://go.googlesource.com/proposal/+/refs/heads/master/design/go2draft-contracts.md</a><br>playground:<a href="https://go2goplay.golang.org/" target="_blank" rel="noopener">https://go2goplay.golang.org/</a><br>Go泛型讨论概要:<a href="https://docs.google.com/document/d/1vrAy9gMpMoS3uaVphB32uVXX4pi-HnNjkMEgyAHX4N4/view#" target="_blank" rel="noopener">https://docs.google.com/document/d/1vrAy9gMpMoS3uaVphB32uVXX4pi-HnNjkMEgyAHX4N4/view#</a></p>
<p class="article-more-link">
<a href="/2020/07/13/go2-type-parameters/#more" class="more-link">More <span class="meta-nav">→</span></a>
</p>
</div><!-- .entry-content -->
<footer class="entry-meta">
<a href="/2020/07/13/go2-type-parameters/">
<time datetime="2020-07-13T10:40:43.000Z" class="entry-date">
2020-07-13
</time>
</a>
<span class="article-delim">•</span>
<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/generics/" rel="tag">generics</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/golang/" rel="tag">golang</a></li></ul>
</footer>
</article>
<article id="post-CPU-Cache总结" class="post-CPU-Cache总结 post type-post status-publish format-standard hentry">
<!---->
<header class="entry-header">
<h1 class="entry-title">
<a class="article-title" href="/2020/05/29/CPU-Cache%E6%80%BB%E7%BB%93/">CPU Cache总结</a>
</h1>
<div class="comments-link">
<a href="javascript:void(0);" data-url="http://yoursite.com/2020/05/29/CPU-Cache%E6%80%BB%E7%BB%93/" data-id="ckcwb0tm8000epcl0c2h050lg" class="leave-reply bdsharebuttonbox" data-cmd="more"></a>
</div><!-- .comments-link -->
</header><!-- .entry-header -->
<div class="entry-content">
<h1 id="1-CPU缓存简介"><a href="#1-CPU缓存简介" class="headerlink" title="1. CPU缓存简介"></a>1. CPU缓存简介</h1><p>CPU缓存是介于内存与CPU之间的存储介质,速度上低于寄存器而高于RAM。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line">|---------------------------------------------------------------|</span><br><span class="line">| |</span><br><span class="line">| L3 Cache(shared by all cores) |</span><br><span class="line">| |</span><br><span class="line">|----------------------------------------------------------------</span><br><span class="line">| | | | |</span><br><span class="line">| L2 Cache | L2 Cache | L2 Cache | L2 Cache |</span><br><span class="line">| | | | |</span><br><span class="line">|----------------------------------------------------------------</span><br><span class="line">| L1 instruction| L1 instruction| L1 instruction| L1 instruction|</span><br><span class="line">|---------------------------------------------------------------- </span><br><span class="line">| L1 Data | L1 Data | L1 Data | L1 Data |</span><br><span class="line">|----------------------------------------------------------------</span><br><span class="line">| | | | |</span><br><span class="line">| Core1 | Core2 | Core3 | Core4 |</span><br><span class="line">| | | | |</span><br><span class="line">|---------------------------------------------------------------|</span><br></pre></td></tr></table></figure>
<p>如上图所示,三级缓存里,L1通常包括指令缓存和数据缓存,L2、L3不分数据与指令缓存,并且L3为所有核心共享。<br>以下是三者速度的参照:</p>
<table>
<thead>
<tr>
<th align="center">Cache</th>
<th align="center">Lentency</th>
<th align="center">CPU cycles</th>
<th align="center">Size</th>
</tr>
</thead>
<tbody><tr>
<td align="center">L1</td>
<td align="center">~1.2ns</td>
<td align="center">4 cycles</td>
<td align="center">32KB~512KB</td>
</tr>
<tr>
<td align="center">L2</td>
<td align="center">~3ns</td>
<td align="center">10 cycles</td>
<td align="center">128KB~24MB</td>
</tr>
<tr>
<td align="center">L3</td>
<td align="center">~12ns</td>
<td align="center">40 cycles</td>
<td align="center">2MB~32MB</td>
</tr>
</tbody></table>
<p>引入缓存一般要考虑两种问题:<br> - 缓存命中率<br> - 缓存一致性</p>
<p class="article-more-link">
<a href="/2020/05/29/CPU-Cache%E6%80%BB%E7%BB%93/#more" class="more-link">More <span class="meta-nav">→</span></a>
</p>
</div><!-- .entry-content -->
<footer class="entry-meta">
<a href="/2020/05/29/CPU-Cache%E6%80%BB%E7%BB%93/">
<time datetime="2020-05-28T16:00:08.000Z" class="entry-date">
2020-05-29
</time>
</a>
<span class="article-delim">•</span>
<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Computer-Science/" rel="tag">Computer Science</a></li></ul>
</footer>
</article>
<article id="post-slice-or-slice-pointer" class="post-slice-or-slice-pointer post type-post status-publish format-standard hentry">
<!---->
<header class="entry-header">
<h1 class="entry-title">
<a class="article-title" href="/2020/05/25/slice-or-slice-pointer/">slice_or_slice_pointer</a>
</h1>
<div class="comments-link">
<a href="javascript:void(0);" data-url="http://yoursite.com/2020/05/25/slice-or-slice-pointer/" data-id="ckcwb0tlv0001pcl07ez972rl" class="leave-reply bdsharebuttonbox" data-cmd="more"></a>
</div><!-- .comments-link -->
</header><!-- .entry-header -->
<div class="entry-content">
<p>论坛上经常看到有人提出切片传递用[]int好还是*[]int好的疑问,正好自己也对这个比较好奇,就借此研究下运行时具体有什么区别。</p>
<p>首先要了解一个常识:切片在runtime时是由一个包含地址、len、cap的结构体表示。</p>
<figure class="highlight golang"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">//definition in runtime/slice.go</span></span><br><span class="line"><span class="keyword">type</span> slice <span class="keyword">struct</span> {</span><br><span class="line"> array unsafe.Pointer</span><br><span class="line"> <span class="built_in">len</span> <span class="keyword">int</span></span><br><span class="line"> <span class="built_in">cap</span> <span class="keyword">int</span></span><br><span class="line">}</span><br></pre></td></tr></table></figure>
<p>这样按照Golang的调用约定func(s []int)应该会压入三个参数,但func(s *[]int)呢,是否会只压入指向切片结构体的指针,下面来通过编译出的汇编代码来验证。</p>
<p class="article-more-link">
<a href="/2020/05/25/slice-or-slice-pointer/#more" class="more-link">More <span class="meta-nav">→</span></a>
</p>
</div><!-- .entry-content -->
<footer class="entry-meta">
<a href="/2020/05/25/slice-or-slice-pointer/">
<time datetime="2020-05-25T07:58:38.000Z" class="entry-date">
2020-05-25
</time>
</a>
<span class="article-delim">•</span>
<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/assembly/" rel="tag">assembly</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/golang/" rel="tag">golang</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/slice/" rel="tag">slice</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/stack/" rel="tag">stack</a></li></ul>
</footer>
</article>
<article id="post-string-byte-convert" class="post-string-byte-convert post type-post status-publish format-standard hentry">
<!---->
<header class="entry-header">
<h1 class="entry-title">
<a class="article-title" href="/2020/05/08/string-byte-convert/">string_byte_convert</a>
</h1>
<div class="comments-link">
<a href="javascript:void(0);" data-url="http://yoursite.com/2020/05/08/string-byte-convert/" data-id="ckcwb0tm9000gpcl04n277plh" class="leave-reply bdsharebuttonbox" data-cmd="more"></a>
</div><!-- .comments-link -->
</header><!-- .entry-header -->
<div class="entry-content">
<p>众所周知golang里切片由一个array/len/cap组成的结构体表示,而字符串是由len+addr表示。<br>今天看fiber源码里有两个相互转化的实现,借此探究下区别和具体运行时是如何处理的。</p>
<p>fiber的源码utils.go里有这样两个函数:</p>
<figure class="highlight go"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> getBytes = <span class="function"><span class="keyword">func</span><span class="params">(s <span class="keyword">string</span>)</span> <span class="params">(b []<span class="keyword">byte</span>)</span></span> {</span><br><span class="line"> <span class="keyword">return</span> *(*[]<span class="keyword">byte</span>)(unsafe.Pointer(&s))</span><br><span class="line">}</span><br><span class="line"><span class="keyword">var</span> getBytesImmutable = <span class="function"><span class="keyword">func</span><span class="params">(s <span class="keyword">string</span>)</span> <span class="params">(b []<span class="keyword">byte</span>)</span></span> {</span><br><span class="line"> <span class="keyword">return</span> []<span class="keyword">byte</span>(s)</span><br><span class="line">}</span><br></pre></td></tr></table></figure>
<p class="article-more-link">
<a href="/2020/05/08/string-byte-convert/#more" class="more-link">More <span class="meta-nav">→</span></a>
</p>
</div><!-- .entry-content -->
<footer class="entry-meta">
<a href="/2020/05/08/string-byte-convert/">
<time datetime="2020-05-08T07:44:29.000Z" class="entry-date">
2020-05-08
</time>
</a>
<span class="article-delim">•</span>
<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/bytes/" rel="tag">bytes</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/golang/" rel="tag">golang</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/string/" rel="tag">string</a></li></ul>
</footer>
</article>
<article id="post-sync-atomic" class="post-sync-atomic post type-post status-publish format-standard hentry">
<!---->
<header class="entry-header">
<h1 class="entry-title">
<a class="article-title" href="/2020/01/18/sync-atomic/">sync/atomic</a>
</h1>
<div class="comments-link">
<a href="javascript:void(0);" data-url="http://yoursite.com/2020/01/18/sync-atomic/" data-id="ckcwb0tm8000dpcl08m065ruc" class="leave-reply bdsharebuttonbox" data-cmd="more"></a>
</div><!-- .comments-link -->
</header><!-- .entry-header -->
<div class="entry-content">
<p>最近学习到golang的sync/atomic包,对于其底层的实现原理十分感兴趣就看了其生成的汇编指令,<br>也便于了解究竟原子操作是如何保证的。</p>
<p>先看一段atomic相关的代码,add函数是把全局变量v原子性地加上了a的值。</p>
<figure class="highlight go"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">package</span> main</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> (</span><br><span class="line"> <span class="string">"fmt"</span></span><br><span class="line"> <span class="string">"sync/atomic"</span></span><br><span class="line">)</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> v <span class="keyword">int64</span></span><br><span class="line"></span><br><span class="line"><span class="function"><span class="keyword">func</span> <span class="title">add</span><span class="params">(a <span class="keyword">int64</span>)</span></span> {</span><br><span class="line"> atomic.AddInt64(&v, a)</span><br><span class="line">}</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="function"><span class="keyword">func</span> <span class="title">main</span><span class="params">()</span></span> {</span><br><span class="line"> fmt.Scanln(&v)</span><br><span class="line"></span><br><span class="line"> <span class="keyword">go</span> add(<span class="number">12</span>)</span><br><span class="line"> <span class="keyword">go</span> add(<span class="number">34</span>)</span><br><span class="line"></span><br><span class="line"> fmt.Println(v)</span><br><span class="line">}</span><br></pre></td></tr></table></figure>
<p class="article-more-link">
<a href="/2020/01/18/sync-atomic/#more" class="more-link">More <span class="meta-nav">→</span></a>
</p>
</div><!-- .entry-content -->
<footer class="entry-meta">
<a href="/2020/01/18/sync-atomic/">
<time datetime="2020-01-18T09:39:32.000Z" class="entry-date">
2020-01-18
</time>
</a>
<span class="article-delim">•</span>
<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/atomic/" rel="tag">atomic</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/golang/" rel="tag">golang</a></li></ul>
</footer>
</article>
<article id="post-removeFromSlice" class="post-removeFromSlice post type-post status-publish format-standard hentry">
<!---->
<header class="entry-header">
<h1 class="entry-title">
<a class="article-title" href="/2020/01/17/removeFromSlice/">Golang移除slice中的某个元素</a>
</h1>
<div class="comments-link">
<a href="javascript:void(0);" data-url="http://yoursite.com/2020/01/17/removeFromSlice/" data-id="ckcwb0tlx0002pcl0f3aydl9k" class="leave-reply bdsharebuttonbox" data-cmd="more"></a>
</div><!-- .comments-link -->
</header><!-- .entry-header -->
<div class="entry-content">
<p>最近刷leetcode遇到个移除切片中某个元素的需求,第一反应是遍历切片然后append下去。<br>但这样需要另外等同大小的空间。能在原切片上操作肯定是最好的。</p>
<p class="article-more-link">
<a href="/2020/01/17/removeFromSlice/#more" class="more-link">More <span class="meta-nav">→</span></a>
</p>
</div><!-- .entry-content -->
<footer class="entry-meta">
<a href="/2020/01/17/removeFromSlice/">
<time datetime="2020-01-17T05:34:15.000Z" class="entry-date">
2020-01-17
</time>
</a>
<span class="article-delim">•</span>
<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/golang/" rel="tag">golang</a></li></ul>
</footer>
</article>
<article id="post-hello-world" class="post-hello-world post type-post status-publish format-standard hentry">
<!---->
<header class="entry-header">
<h1 class="entry-title">
<a class="article-title" href="/2020/01/16/hello-world/">Hello World</a>
</h1>
<div class="comments-link">
<a href="javascript:void(0);" data-url="http://yoursite.com/2020/01/16/hello-world/" data-id="ckcwb0tlp0000pcl0am1og6j2" class="leave-reply bdsharebuttonbox" data-cmd="more"></a>
</div><!-- .comments-link -->
</header><!-- .entry-header -->
<div class="entry-content">
<p>Welcome to <a href="https://hexo.io/" target="_blank" rel="noopener">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/" target="_blank" rel="noopener">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html" target="_blank" rel="noopener">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues" target="_blank" rel="noopener">GitHub</a>.</p>
<h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo new <span class="string">"My New Post"</span></span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/writing.html" target="_blank" rel="noopener">Writing</a></p>
<h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html" target="_blank" rel="noopener">Server</a></p>
<h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html" target="_blank" rel="noopener">Generating</a></p>
<h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html" target="_blank" rel="noopener">Deployment</a></p>
</div><!-- .entry-content -->
<footer class="entry-meta">
<a href="/2020/01/16/hello-world/">
<time datetime="2020-01-16T08:18:46.643Z" class="entry-date">
2020-01-16
</time>
</a>
</footer>
</article>
</div></div>
<div id="secondary" class="widget-area" role="complementary">
<aside id="search" class="widget widget_search"><form role="search" method="get" accept-charset="utf-8" id="searchform" class="searchform" action="//google.com/search">
<div>
<input type="text" value="" name="s" id="s" />
<input type="submit" id="searchsubmit" value="搜索" />
</div>
</form></aside>
<aside class="widget">
<h3 class="widget-title">Recents</h3>
<div class="widget-content">
<ul>
<li>
<a href="/2020/07/13/go2-type-parameters/">go2_type_parameters</a>
</li>
<li>
<a href="/2020/05/29/CPU-Cache%E6%80%BB%E7%BB%93/">CPU Cache总结</a>
</li>
<li>
<a href="/2020/05/25/slice-or-slice-pointer/">slice_or_slice_pointer</a>
</li>
<li>
<a href="/2020/05/08/string-byte-convert/">string_byte_convert</a>
</li>
<li>
<a href="/2020/01/18/sync-atomic/">sync/atomic</a>
</li>
</ul>
</div>
</aside>
<aside class="widget">
<h3 class="widget-title">Tags</h3>
<div class="widget-content">
<ul class="tag-list" itemprop="keywords"><li class="tag-list-item"><a class="tag-list-link" href="/tags/Computer-Science/" rel="tag">Computer Science</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/assembly/" rel="tag">assembly</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/atomic/" rel="tag">atomic</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/bytes/" rel="tag">bytes</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/generics/" rel="tag">generics</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/golang/" rel="tag">golang</a><span class="tag-list-count">5</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/slice/" rel="tag">slice</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/stack/" rel="tag">stack</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/string/" rel="tag">string</a><span class="tag-list-count">1</span></li></ul>
</div>
</aside>
<aside class="widget">
<h3 class="widget-title">Tag Cloud</h3>
<div class="widget-content tagcloud">
<a href="/tags/Computer-Science/" style="font-size: 10px;">Computer Science</a> <a href="/tags/assembly/" style="font-size: 10px;">assembly</a> <a href="/tags/atomic/" style="font-size: 10px;">atomic</a> <a href="/tags/bytes/" style="font-size: 10px;">bytes</a> <a href="/tags/generics/" style="font-size: 10px;">generics</a> <a href="/tags/golang/" style="font-size: 20px;">golang</a> <a href="/tags/slice/" style="font-size: 10px;">slice</a> <a href="/tags/stack/" style="font-size: 10px;">stack</a> <a href="/tags/string/" style="font-size: 10px;">string</a>
</div>
</aside>
</div>
</div>
<footer id="colophon" role="contentinfo">
<p>© 2020 John Doe
All rights reserved.</p>
<p>Powered by <a href="http://hexo.io/" target="_blank">Hexo</a></p>
</footer>
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"1","bdMiniList":false,"bdPic":"","bdStyle":"2","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='/js/share.js'];</script>
<script src="/js/jquery-3.3.1.min.js"></script>
<link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
<script src="/fancybox/jquery.fancybox.pack.js"></script>
<script src="/js/script.js"></script>
<script src="/js/navigation.js"></script>
<div id="bg"></div>
</div>
</body>
</html>