-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
642 lines (400 loc) · 20.1 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
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.2.0">
<link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
<link rel="mask-icon" href="/images/logo.svg" color="#222">
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/[email protected]/animate.min.css">
<script class="hexo-configurations">
var NexT = window.NexT || {};
var CONFIG = {"hostname":"codingknees.github.io","root":"/","scheme":"Muse","version":"8.0.2","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":false,"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"prism":false,"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果:${query}","hits_time":"找到 ${hits} 个搜索结果(用时 ${time} 毫秒)","hits":"找到 ${hits} 个搜索结果"},"path":"/search.xml","localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false}};
</script>
<meta name="description" content="codingknees' blog">
<meta property="og:type" content="website">
<meta property="og:title" content="TecBlog">
<meta property="og:url" content="http://codingknees.github.io/index.html">
<meta property="og:site_name" content="TecBlog">
<meta property="og:description" content="codingknees' blog">
<meta property="og:locale" content="zh_CN">
<meta property="article:author" content="codingknees">
<meta name="twitter:card" content="summary">
<link rel="canonical" href="http://codingknees.github.io/">
<script class="page-configurations">
// https://hexo.io/docs/variables.html
CONFIG.page = {
sidebar: "",
isHome : true,
isPost : false,
lang : 'zh-CN'
};
</script>
<title>TecBlog</title>
<noscript>
<style>
body { margin-top: 2rem; }
.use-motion .menu-item,
.use-motion .sidebar,
.use-motion .post-block,
.use-motion .pagination,
.use-motion .comments,
.use-motion .post-header,
.use-motion .post-body,
.use-motion .collection-header {
visibility: visible;
}
.use-motion .header,
.use-motion .site-brand-container .toggle,
.use-motion .footer { opacity: initial; }
.use-motion .site-title,
.use-motion .site-subtitle,
.use-motion .custom-logo-image {
opacity: initial;
top: initial;
}
.use-motion .logo-line {
transform: scaleX(1);
}
.search-pop-overlay, .sidebar-nav { display: none; }
.sidebar-panel { display: block; }
</style>
</noscript>
</head>
<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
<div class="headband"></div>
<main class="main">
<header class="header" itemscope itemtype="http://schema.org/WPHeader">
<div class="header-inner"><div class="site-brand-container">
<div class="site-nav-toggle">
<div class="toggle" aria-label="切换导航栏">
<span class="toggle-line"></span>
<span class="toggle-line"></span>
<span class="toggle-line"></span>
</div>
</div>
<div class="site-meta">
<a href="/" class="brand" rel="start">
<i class="logo-line"></i>
<h1 class="site-title">TecBlog</h1>
<i class="logo-line"></i>
</a>
<p class="site-subtitle" itemprop="description">codingknees</p>
</div>
<div class="site-nav-right">
<div class="toggle popup-trigger">
<i class="fa fa-search fa-fw fa-lg"></i>
</div>
</div>
</div>
<nav class="site-nav">
<ul class="main-menu menu">
<li class="menu-item menu-item-home">
<a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>
</li>
<li class="menu-item menu-item-tags">
<a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a>
</li>
<li class="menu-item menu-item-categories">
<a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a>
</li>
<li class="menu-item menu-item-archives">
<a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>
</li>
<li class="menu-item menu-item-search">
<a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
</a>
</li>
</ul>
</nav>
<div class="search-pop-overlay">
<div class="popup search-popup">
<div class="search-header">
<span class="search-icon">
<i class="fa fa-search"></i>
</span>
<div class="search-input-container">
<input autocomplete="off" autocapitalize="off" maxlength="80"
placeholder="搜索..." spellcheck="false"
type="search" class="search-input">
</div>
<span class="popup-btn-close">
<i class="fa fa-times-circle"></i>
</span>
</div>
<div class="search-result-container no-result">
<div class="search-result-icon">
<i class="fa fa-spinner fa-pulse fa-5x"></i>
</div>
</div>
</div>
</div>
</div>
<div class="toggle sidebar-toggle">
<span class="toggle-line"></span>
<span class="toggle-line"></span>
<span class="toggle-line"></span>
</div>
<aside class="sidebar">
<div class="sidebar-inner sidebar-overview-active">
<ul class="sidebar-nav">
<li class="sidebar-nav-toc">
文章目录
</li>
<li class="sidebar-nav-overview">
站点概览
</li>
</ul>
<div class="sidebar-panel-container">
<!--noindex-->
<section class="post-toc-wrap sidebar-panel">
</section>
<!--/noindex-->
<section class="site-overview-wrap sidebar-panel">
<div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
<p class="site-author-name" itemprop="name">codingknees</p>
<div class="site-description" itemprop="description">codingknees' blog</div>
</div>
<div class="site-state-wrap site-overview-item animated">
<nav class="site-state">
<div class="site-state-item site-state-posts">
<a href="/archives/">
<span class="site-state-item-count">4</span>
<span class="site-state-item-name">日志</span>
</a>
</div>
<div class="site-state-item site-state-tags">
<span class="site-state-item-count">3</span>
<span class="site-state-item-name">标签</span>
</div>
</nav>
</div>
</section>
</div>
</div>
</aside>
<div class="sidebar-dimmer"></div>
</header>
<div class="back-to-top">
<i class="fa fa-arrow-up"></i>
<span>0%</span>
</div>
<noscript>
<div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>
<div class="main-inner index posts-expand">
<div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh-CN">
<link itemprop="mainEntityOfPage" href="http://codingknees.github.io/2020/12/09/%E7%90%86%E8%A7%A3gitsubmodule/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.gif">
<meta itemprop="name" content="codingknees">
<meta itemprop="description" content="codingknees' blog">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="TecBlog">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2020/12/09/%E7%90%86%E8%A7%A3gitsubmodule/" class="post-title-link" itemprop="url">理解gitsubmodule</a>
</h2>
<div class="post-meta-container">
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2020-12-09 21:27:09 / 修改时间:22:51:26" itemprop="dateCreated datePublished" datetime="2020-12-09T21:27:09+08:00">2020-12-09</time>
</span>
</div>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<p>git submodule最好的理解,就是指针。主仓库中,某个特定的目录,在版本管理模型中,不被标识为目录,而是一个指向其他仓库某个具体提交(commit-ish)的指针。<br>因此,对于子仓库目录而言,git不关心里面的具体内容,而只关心他的“指向”,即commit-ish。目录在,则子仓库在;目录被删除,则认为不再引用该子仓库。而目录在,不管里面的内容有还是没有(有,且被修改是另外一回事),都认为对子仓库的引用不变。这里之所以说这里多,是因为这对子仓库添加,拉取,删除的理解非常重要。</p>
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2020/12/09/%E7%90%86%E8%A7%A3gitsubmodule/#more" rel="contents">
阅读全文 »
</a>
</div>
<!--/noindex-->
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
</div>
<div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh-CN">
<link itemprop="mainEntityOfPage" href="http://codingknees.github.io/2020/11/26/protobuf%20golang%E7%9A%84%E7%89%88%E6%9C%AC%E9%97%AE%E9%A2%98/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.gif">
<meta itemprop="name" content="codingknees">
<meta itemprop="description" content="codingknees' blog">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="TecBlog">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2020/11/26/protobuf%20golang%E7%9A%84%E7%89%88%E6%9C%AC%E9%97%AE%E9%A2%98/" class="post-title-link" itemprop="url">未命名</a>
</h2>
<div class="post-meta-container">
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2020-11-26 21:06:01 / 修改时间:21:46:25" itemprop="dateCreated datePublished" datetime="2020-11-26T21:06:01+08:00">2020-11-26</time>
</span>
</div>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<h2 id="protobuf-golang的版本历史问题"><a href="#protobuf-golang的版本历史问题" class="headerlink" title="protobuf golang的版本历史问题"></a>protobuf golang的版本历史问题</h2><p>v1版<br>模块:github.com/golang/protobuf<br>仓库地址:<a target="_blank" rel="noopener" href="https://github.com/golang/protobuf">https://github.com/golang/protobuf</a><br>protoc-gen-go包:github.com/golang/protobuf/protoc-gen-go<br>首次release时间:2010.4.20<br>依赖:从1.4.0开始,依赖v2实现</p>
<p>v2版<br>模块:google.golang.org/protobuf<br>仓库地址:<a target="_blank" rel="noopener" href="https://github.com/protocolbuffers/protobuf-go">https://github.com/protocolbuffers/protobuf-go</a><br>protoc-gen-go包:google.golang.org/protobuf/cmd/protoc-gen-go<br>首次release时间:2020.3.2<br>依赖:从go.mod看对v1有依赖,但是只在文件internal/weakdeps/weakdeps.go找到如下依赖代码:</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">import _ "github.com/golang/protobuf/proto"</span><br></pre></td></tr></table></figure>
<p>没搞懂这种循环依赖为什么没问题?</p>
<p>根据<a target="_blank" rel="noopener" href="https://blog.golang.org/protobuf-apiv2">官方说明</a>,v2具有更好的性能,更清晰的接口以及对反射的一手支持。<br>v1从1.4.0开始,底层其实是对v2的封装,提供v1的接口。<br>v2使用不同的包名,这样兼顾了性能上的收益和使用上的正确性,可以让开发者进行平稳过渡。<br>但是,两个版本由于原理不同,他们各自工具生成的.pb.go只能搭配自己的版本的代码使用。</p>
<p>对于为何不遵循语义化版本的惯例,官方并没有直接说出来。只是说明,v1版的版本号一定不会升到1.20.0,所以可以区分v1和v2。但是又声明会对v1版提供无限期的支持。<br>这里感觉就有点矛盾了?无限期支持,怎么保证不升到1.20.0?</p>
<p>参考文档<br>v1:<br><a target="_blank" rel="noopener" href="https://blog.golang.org/protobuf">https://blog.golang.org/protobuf</a><br><a target="_blank" rel="noopener" href="https://github.com/golang/protobuf/blob/master/go.mod">https://github.com/golang/protobuf/blob/master/go.mod</a></p>
<p>v2:<br><a target="_blank" rel="noopener" href="https://blog.golang.org/protobuf-apiv2">https://blog.golang.org/protobuf-apiv2</a><br><a target="_blank" rel="noopener" href="https://github.com/protocolbuffers/protobuf-go/blob/master/go.mod">https://github.com/protocolbuffers/protobuf-go/blob/master/go.mod</a></p>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
</div>
<div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh-CN">
<link itemprop="mainEntityOfPage" href="http://codingknees.github.io/2020/11/26/hexo-github%E6%90%AD%E5%BB%BA%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.gif">
<meta itemprop="name" content="codingknees">
<meta itemprop="description" content="codingknees' blog">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="TecBlog">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2020/11/26/hexo-github%E6%90%AD%E5%BB%BA%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2/" class="post-title-link" itemprop="url">hexo+github搭建个人博客</a>
</h2>
<div class="post-meta-container">
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2020-11-26 18:00:42 / 修改时间:20:27:58" itemprop="dateCreated datePublished" datetime="2020-11-26T18:00:42+08:00">2020-11-26</time>
</span>
</div>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<p>最近工作中学的新东西挺多的,重开博客记录一下。博客采用hexo+github page的方式搭建。<br>主要参考这篇<a target="_blank" rel="noopener" href="https://zhuanlan.zhihu.com/p/26625249">文章</a>,进行操作。<br>用的是这个<a target="_blank" rel="noopener" href="https://github.com/wzpan/hexo-theme-freemind">主题</a>的readable配色方案。<br>支持搜索,留言功能,但是顶部的分类和标签按钮不可用。对布局和颜色也不是特别满意,后面有需要再折腾这些吧。</p>
<p>整个过程还算是比较顺利,下面简单记录一下:</p>
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2020/11/26/hexo-github%E6%90%AD%E5%BB%BA%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2/#more" rel="contents">
阅读全文 »
</a>
</div>
<!--/noindex-->
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
</div>
<div class="post-block">
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh-CN">
<link itemprop="mainEntityOfPage" href="http://codingknees.github.io/2020/11/26/grpcurl%E6%8C%87%E5%8D%97/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.gif">
<meta itemprop="name" content="codingknees">
<meta itemprop="description" content="codingknees' blog">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="TecBlog">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2020/11/26/grpcurl%E6%8C%87%E5%8D%97/" class="post-title-link" itemprop="url">grpcurl指南</a>
</h2>
<div class="post-meta-container">
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2020-11-26 17:54:07 / 修改时间:19:56:44" itemprop="dateCreated datePublished" datetime="2020-11-26T17:54:07+08:00">2020-11-26</time>
</span>
</div>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<p>基于protoreflect包实现的,gRPC服务访问,探查工具</p>
<p>有3种指定gRPC服务schema的方式:</p>
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2020/11/26/grpcurl%E6%8C%87%E5%8D%97/#more" rel="contents">
阅读全文 »
</a>
</div>
<!--/noindex-->
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
</div>
<script>
window.addEventListener('tabs:register', () => {
let { activeClass } = CONFIG.comments;
if (CONFIG.comments.storage) {
activeClass = localStorage.getItem('comments_active') || activeClass;
}
if (activeClass) {
const activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
if (activeTab) {
activeTab.click();
}
}
});
if (CONFIG.comments.storage) {
window.addEventListener('tabs:click', event => {
if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
const commentClass = event.target.classList[1];
localStorage.setItem('comments_active', commentClass);
});
}
</script>
</div>
</main>
<footer class="footer">
<div class="footer-inner">
<div class="copyright">
©
<span itemprop="copyrightYear">2020</span>
<span class="with-love">
<i class="fa fa-heart"></i>
</span>
<span class="author" itemprop="copyrightHolder">codingknees</span>
</div>
</div>
</footer>
<script src="//cdn.jsdelivr.net/npm/[email protected]/lib/anime.min.js"></script>
<script src="/js/utils.js"></script><script src="/js/motion.js"></script><script src="/js/schemes/muse.js"></script><script src="/js/next-boot.js"></script>
<script src="/js/local-search.js"></script>
</body>
</html>