<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/"><channel><title>Go on Shaowen Chen's Website</title><link>https://www.chenshaowen.com/en/tags/go/</link><description>Recent content in Go on Shaowen Chen's Website</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>&amp;copy;2016 - {year}, All Rights Reserved.</copyright><lastBuildDate>Sat, 13 May 2023 00:00:00 +0000</lastBuildDate><sy:updatePeriod>weekly</sy:updatePeriod><atom:link href="https://www.chenshaowen.com/en/tags/go/atom.xml" rel="self" type="application/rss+xml"/><item><title>Writing WebAssembly Programs in Go</title><link>https://www.chenshaowen.com/en/blog/get-webassembly-programs-using-go.html</link><pubDate>Sat, 13 May 2023 00:00:00 +0000</pubDate><atom:modified>Sat, 13 May 2023 00:00:00 +0000</atom:modified><guid>https://www.chenshaowen.com/en/blog/get-webassembly-programs-using-go.html</guid><description>1. Introduction to WebAssembly Cross-platform: it can run on any platform that supports WebAssembly, including web browsers, servers, and mobile devices
High performance: it uses a compact binary format that can be loaded and parsed quickly in the browser, improving application performance
Security: it uses a sandbox model that isolates the code running inside it, protecting the system from malicious code</description><dc:creator>微信公众号</dc:creator><category>Go</category><category>WebAssembly</category><category>Frontend</category><category>R&amp;D</category></item><item><title>Developing an Istio WasmPlugin with TinyGo</title><link>https://www.chenshaowen.com/en/blog/developing-istio-wasm-plugin-by-tinygo.html</link><pubDate>Wed, 22 Feb 2023 01:00:00 +0000</pubDate><atom:modified>Wed, 22 Feb 2023 01:00:00 +0000</atom:modified><guid>https://www.chenshaowen.com/en/blog/developing-istio-wasm-plugin-by-tinygo.html</guid><description>wasme only supports up to Istio 1.9, while I am using Istio 1.14, so this post goes straight to tinygo for verification and learning.
1. Installing tinygo Requirements Go v1.18+
Install tinygo 1 2 brew tap tinygo-org/tools brew install tinygo Check the version 1 2 3 tinygo version tinygo version 0.</description><dc:creator>微信公众号</dc:creator><category>tinygo</category><category>Istio</category><category>Wasm</category><category>Cloud Native</category><category>Service Mesh</category><category>R&amp;D</category><category>Go</category><category>Learning</category><category>Extension</category></item><item><title>Time and Time Zones in Go</title><link>https://www.chenshaowen.com/en/blog/the-tips-of-time-and-tz-in-go.html</link><pubDate>Tue, 07 Dec 2021 00:00:00 +0000</pubDate><atom:modified>Tue, 07 Dec 2021 00:00:00 +0000</atom:modified><guid>https://www.chenshaowen.com/en/blog/the-tips-of-time-and-tz-in-go.html</guid><description>1. Time and Time Zones 1.1 Time Standards UTC, Coordinated Universal Time, is the current time standard, counted by atomic time.
GMT, Greenwich Mean Time, is the older time standard, which defines the moment the sun passes over the Royal Observatory in Greenwich, on the outskirts of London, as 12 noon.</description><dc:creator>微信公众号</dc:creator><category>Go</category><category>R&amp;D</category><category>Time</category><category>Time Zone</category></item><item><title>Building and Using Go Private Packages</title><link>https://www.chenshaowen.com/en/blog/building-and-using-go-private-packages.html</link><pubDate>Thu, 24 Jun 2021 00:00:00 +0000</pubDate><atom:modified>Thu, 24 Jun 2021 00:00:00 +0000</atom:modified><guid>https://www.chenshaowen.com/en/blog/building-and-using-go-private-packages.html</guid><description>1. Create a Go Modules Project Create the directory 1 2 mkdir go-test cd go-test Initialize the package 1 2 3 4 5 go mod init gitlab.private.com/shaowenchen/go-test go: creating new go.mod: module gitlab.private.com/shaowenchen/go-test go: to add module requirements and sums: go mod tidy Add the business code main.go
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 package main import ( &amp;#34;github.</description><dc:creator>微信公众号</dc:creator><category>Go</category><category>Getting Started</category><category>Build</category><category>R&amp;D</category></item><item><title>A Practical Algorithm: Bloom Filter</title><link>https://www.chenshaowen.com/en/blog/practical-algorithm-of-bloom-filter.html</link><pubDate>Tue, 01 Dec 2020 00:00:00 +0000</pubDate><atom:modified>Tue, 01 Dec 2020 00:00:00 +0000</atom:modified><guid>https://www.chenshaowen.com/en/blog/practical-algorithm-of-bloom-filter.html</guid><description>1. What Is Bloom Filter A Bloom Filter is a data structure proposed by Bloom in 1970.
It maps elements (x, y, z) through a series of functions into a binary vector (a 0101 sequence), and is used to quickly determine whether an element w is in a set. As shown below (from Wikipedia):</description><dc:creator>微信公众号</dc:creator><category>Algorithms</category><category>R&amp;D</category><category>Go</category><category>Optimization</category><category>Bloom Filter</category></item><item><title>Let's Learn Go -- (6) Interface</title><link>https://www.chenshaowen.com/en/blog/let-us-start-learning-go-6.html</link><pubDate>Fri, 04 Sep 2020 00:00:00 +0000</pubDate><atom:modified>Fri, 04 Sep 2020 00:00:00 +0000</atom:modified><guid>https://www.chenshaowen.com/en/blog/let-us-start-learning-go-6.html</guid><description>1. Interface-Oriented Programming 1.1 Characteristics Interface-oriented programming emphasizes interaction between modules through interfaces. First, the caller specifies a set of method signatures; then, the callee implements that set of methods.
What sets interface programming apart from other programming styles is that it focuses on methods, not attributes. In many programming scenarios, methods are defined around attributes.</description><dc:creator>微信公众号</dc:creator><category>Go</category><category>Let's Learn Go</category><category>Interface</category><category>Learning</category></item><item><title>Let's Learn Go -- (5) Goroutine and Channel</title><link>https://www.chenshaowen.com/en/blog/let-us-start-learning-go-5.html</link><pubDate>Thu, 03 Sep 2020 00:00:00 +0000</pubDate><atom:modified>Thu, 03 Sep 2020 00:00:00 +0000</atom:modified><guid>https://www.chenshaowen.com/en/blog/let-us-start-learning-go-5.html</guid><description>1. The Concurrency Model in Go 1.1 The Communication Model: CSP CSP stands for Communicating Sequential Process, a model for concurrent communication. A Process can use many Channels, and a Channel does not care who is using it — it is only responsible for sending and receiving data.
In the Go community there is a very famous maxim: do not communicate by sharing memory; instead, share memory by communicating.</description><dc:creator>微信公众号</dc:creator><category>Go</category><category>Concurrency</category><category>Parallelism</category><category>Goroutine</category><category>Channel</category><category>Learning</category><category>Let's Learn Go</category></item><item><title>What Is Functional Programming</title><link>https://www.chenshaowen.com/en/blog/what-is-functional-programming.html</link><pubDate>Wed, 02 Sep 2020 00:00:00 +0000</pubDate><atom:modified>Wed, 02 Sep 2020 00:00:00 +0000</atom:modified><guid>https://www.chenshaowen.com/en/blog/what-is-functional-programming.html</guid><description>1. What a Programming Paradigm Is A programming paradigm is a class of typical programming conventions. On one hand, it provides engineers with a way to model entities, linking the physical world to code; on the other hand, it provides engineers with a way of thinking about code and programs.</description><dc:creator>微信公众号</dc:creator><category>Functional Programming</category><category>Go</category><category>Programming Paradigm</category><category>Python</category><category>What Is</category></item><item><title>Incomplete Data When Using Base64 to Decode JWT Playload</title><link>https://www.chenshaowen.com/en/blog/incomplete-data-using-base64-decoding-jwt-playload.html</link><pubDate>Mon, 08 Jun 2020 00:00:00 +0000</pubDate><atom:modified>Mon, 08 Jun 2020 00:00:00 +0000</atom:modified><guid>https://www.chenshaowen.com/en/blog/incomplete-data-using-base64-decoding-jwt-playload.html</guid><description>When Base64-decoding a JWT, I found that the JSON data was incomplete. This article mainly introduces the relevant knowledge and solves this problem. 1. Introduction to JWT JWT passes authentication by setting Authorization: Bearer &amp;lt;token&amp;gt; in the Header. A JWT Token is a Base64-encoded string joined by dots, something like</description><dc:creator>微信公众号</dc:creator><category>Go</category><category>JWT</category><category>Encoding</category><category>Base64</category><category>Security</category><category>R&amp;D</category></item><item><title>How to Develop an Operator Using KubeBuilder</title><link>https://www.chenshaowen.com/en/blog/how-to-develop-a-operator-using-kubebuilder.html</link><pubDate>Wed, 25 Sep 2019 00:00:00 +0000</pubDate><atom:modified>Wed, 25 Sep 2019 00:00:00 +0000</atom:modified><guid>https://www.chenshaowen.com/en/blog/how-to-develop-a-operator-using-kubebuilder.html</guid><description>With the Operator approach, Kubernetes functionality can be extended in a friendly way. Operator = CRD + Controller. First you generate the CRD from a yaml definition, then the Controller continuously watches the data in etcd and performs the corresponding actions. There is a lot of tedious and repetitive work involved in developing an Operator.</description><dc:creator>微信公众号</dc:creator><category>Kubernetes</category><category>Go</category><category>Operator</category><category>R&amp;D</category><category>Operations</category><category>CRD</category><category>Learning</category></item><item><title>Let's Learn Go -- (3) Go Modules</title><link>https://www.chenshaowen.com/en/blog/let-us-start-learning-go-3.html</link><pubDate>Tue, 23 Jul 2019 00:00:00 +0000</pubDate><atom:modified>Tue, 23 Jul 2019 00:00:00 +0000</atom:modified><guid>https://www.chenshaowen.com/en/blog/let-us-start-learning-go-3.html</guid><description>1. Go&amp;rsquo;s Package Management Mechanisms 1.1 GOPATH GOPATH pulls code with the go get command and places it in the GOPATH directory. The problems with GOPATH are: It cannot manage package versions It uses a global repository, so it cannot isolate projects effectively 1.2 Vendor Starting with version 1.5, Go</description><dc:creator>微信公众号</dc:creator><category>Go</category><category>GoModules</category><category>Let's Learn Go</category><category>Learning</category><category>R&amp;D</category><category>Package Management</category></item><item><title>Let's Learn Go -- (2) Data and Logic Structures</title><link>https://www.chenshaowen.com/en/blog/let-us-start-learning-go-2.html</link><pubDate>Wed, 05 Jun 2019 00:00:00 +0000</pubDate><atom:modified>Wed, 05 Jun 2019 00:00:00 +0000</atom:modified><guid>https://www.chenshaowen.com/en/blog/let-us-start-learning-go-2.html</guid><description>1. Go&amp;rsquo;s Data Structures Basic types
Boolean: bool Integer: byte, int, int8, int16, uint, uintptr Floating point: float32, float64 Complex: complex64, complex128 String: string Character: rune Error: error Composite types
Pointer: pointer Array: array Slice: slice Dictionary: map Channel: chan Struct: struct Interface: interface A Go variable identifier is made up of letters, digits, and underscores, and its first character cannot be a digit.</description><dc:creator>微信公众号</dc:creator><category>Go</category><category>Let's Learn Go</category><category>Types</category><category>Data Structures</category></item><item><title>Go Development Configuration</title><link>https://www.chenshaowen.com/en/blog/configuration-of-developing-go.html</link><pubDate>Wed, 23 Jan 2019 00:00:00 +0000</pubDate><atom:modified>Wed, 23 Jan 2019 00:00:00 +0000</atom:modified><guid>https://www.chenshaowen.com/en/blog/configuration-of-developing-go.html</guid><description>1. Common Environment Variables 1.1 GOROOT $GOROOT is the local directory where the Go package is installed.
1 2 3 4 cd /c/Go ls AUTHORS CONTRIBUTORS PATENTS VERSION bin favicon.ico misc robots.txt test CONTRIBUTING.md LICENSE README.md api doc lib pkg src 1.2 GOPATH $GOPATH is the Go workspace directory, used to hold code, third-party libraries, compiled intermediate files, and so on.</description><dc:creator>微信公众号</dc:creator><category>Go</category><category>Getting Started</category><category>Environment Variables</category><category>Development Environment</category><category>R&amp;D</category></item><item><title>Installing the Python3 and Go Kernels in Jupyter</title><link>https://www.chenshaowen.com/en/blog/install-python3-and-go-kernel-in-jupyter.html</link><pubDate>Sun, 09 Sep 2018 00:00:00 +0000</pubDate><atom:modified>Sun, 09 Sep 2018 00:00:00 +0000</atom:modified><guid>https://www.chenshaowen.com/en/blog/install-python3-and-go-kernel-in-jupyter.html</guid><description>Earlier we mentioned that Jupyter Notebook is an interactive notebook that supports running more than 40 programming languages and is very well suited to teaching. Recently, while learning the Go language, I thought of Jupyter. This article mainly describes how to install the Python3 and Go kernels inside Jupyter. 1.</description><dc:creator>微信公众号</dc:creator><category>Jupyter</category><category>Go</category><category>Python3</category><category>Learning</category><category>R&amp;D</category></item></channel></rss>