<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Planet | 褪尘矗心</title>
    <link>https://learn.tclx.xyz/</link>
    <description>Recent content on Planet | 褪尘矗心</description>
    <image>
      <url>https://learn.tclx.xyz/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</url>
      <link>https://learn.tclx.xyz/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</link>
    </image>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh-CN</language>
    <lastBuildDate>Tue, 22 Feb 2022 16:48:15 +0800</lastBuildDate><atom:link href="https://learn.tclx.xyz/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Hugo utterances 评论及暗黑模式适配</title>
      <link>https://learn.tclx.xyz/p/45816afc/</link>
      <pubDate>Sun, 16 Jan 2022 16:00:28 +0800</pubDate>
      
      <guid>https://learn.tclx.xyz/p/45816afc/</guid>
      <description>iframe 跨源通信与 localStorage 共同实现暗黑模式适配</description>
    </item>
    
    <item>
      <title>【2022-02-22】Go 反射简述</title>
      <link>https://learn.tclx.xyz/p/9264ab13/</link>
      <pubDate>Tue, 22 Feb 2022 16:48:15 +0800</pubDate>
      
      <guid>https://learn.tclx.xyz/p/9264ab13/</guid>
      <description>反射的核心是接口对象与反射对象转换，即 reflect.Value &amp;lt;-&amp;gt; interface{}，因此 reflect.ValueOf() 是反射的入口，Value.Interface() 是反射的出口。
反射三大核心   Type（Kind 是底层类型，通常基础数据类型（基类型）两者相同）
  Value
  转换
  Value.Elem() vs reflect.Indirect(Value)   reflect.Value 是指针，两者等效，返回指针指向的对象
  reflect.Value 是接口，Indirect 返回相同的值，而 Elem 返回所包含的动态值（因为被接口存储的指针本身是不能寻址和进行设置操作的）
 如果 reflect.Value 不是接口值，会被包裹在一个 interface{} 中，反之是接口值，则存储在其中的具体值作为 interface{} 传递。
 package main import ( &amp;#34;fmt&amp;#34; &amp;#34;io&amp;#34; &amp;#34;os&amp;#34; &amp;#34;reflect&amp;#34; ) func main() { var r io.Reader = os.Stdin // os.Stdin is of type *os.File which implements io.Reader  v := reflect.</description>
    </item>
    
    <item>
      <title>【2022-01-22】protobuf 备忘录</title>
      <link>https://learn.tclx.xyz/p/a1cf3a36/</link>
      <pubDate>Sat, 22 Jan 2022 18:50:15 +0800</pubDate>
      
      <guid>https://learn.tclx.xyz/p/a1cf3a36/</guid>
      <description>protobuf 即 Protocol Buffers，是一种轻便高效的结构化数据存储格式，与语言、平台无关，可扩展可序列化。protobuf 性能和效率大幅度优于 JSON、XML 等其他的结构化数据格式。
protobuf 语法   在非空非注释第一行使用 syntax = &amp;quot;proto3&amp;quot; 标明版本
  （可选）package 作用类似命名空间，防止不同的消息类型有命名冲突
  消息类型由字段组成，每个字段赋予唯一标识符（范围 [1, 2^29^-1]），对应 Go 中的 struct
  每个字段的修饰符默认为 singular，repeated 表示字段可重复，reserved &amp;lt;标识符 / 字段名&amp;gt; 表示保留字段
syntax = &amp;#34;proto3&amp;#34;;package main;// this is a comment message Student { string name = 1; bool male = 2; repeated int32 scores = 3;}  字段没有赋值默认为零值
  字段类型
 基本类型 枚举第一个选项必须是 0，若需要允许赋予相同的标识符，则在枚举体内设置 option allow_alias = true; 消息类型可以作为字段类型 any / oneof map    除了消息类型，还可以定义 RPC 服务接口</description>
    </item>
    
    <item>
      <title>【2022-01-18】Golang 简洁架构</title>
      <link>https://learn.tclx.xyz/p/d3464603/</link>
      <pubDate>Tue, 18 Jan 2022 19:56:45 +0800</pubDate>
      
      <guid>https://learn.tclx.xyz/p/d3464603/</guid>
      <description> 转载：https://zhuanlan.zhihu.com/p/454054072 &amp;ldquo;Golang 简洁架构实战&amp;rdquo;
 核心：明确的上下层模块、数据流的流向和逻辑。
重构 先让代码工作起来-如果代码不能工作，就不能产生价值；然后再试图将它变好-通过对代码进行重构，让我们自己和其他人更好地理解代码，并能按照需求不断地修改代码。
The Clean Architecture 简洁架构里对项目提出的要求：
 独立于框架，作为工具使用，而不是将系统塞进它们有限的约束中 可测试，业务规则可以在没有UI、数据库、Web服务器或任何其他外部元素的情况下被测试 独立于用户界面，一个 Web UI 可以被替换成一个控制台 UI，而不改变业务规则 独立于数据库，将 MySQL 切换为 MongDB 不需要修改所有的实现 独立于任何外部机构  </description>
    </item>
    
    <item>
      <title>Hugo PaperMod 主题配置</title>
      <link>https://learn.tclx.xyz/p/b26dc8c4/</link>
      <pubDate>Fri, 31 Dec 2021 21:12:51 +0800</pubDate>
      
      <guid>https://learn.tclx.xyz/p/b26dc8c4/</guid>
      <description>Getting started PaperMod myself!</description>
    </item>
    
    
    
  </channel>
</rss>
