Go
Time and Time Zones in Go
· β˜• 7 min read
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.

Building and Using Go Private Packages
· β˜• 3 min read
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 ( "github.

It Runs Fine Locally, but GitHub Actions Keeps Failing
· β˜• 4 min read
1. A Confusing Problem 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 name: Go on: [push, pull_request] jobs: build: name: CI runs-on: ubuntu-latest steps: - name: Set up Go 1.13 uses: actions/setup-go@v1 with: go-version: 1.13 - name: Check out code into the Go module directory uses: actions/checkout@v2 - name: Check pr is properly formatted run: diff -u <(echo -n) <(gofmt -d .

A Practical Algorithm: Bloom Filter
· β˜• 6 min read
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):

Let's Learn Go -- (6) Interface
· β˜• 5 min read
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.