Go
How to Develop an Operator Using KubeBuilder
· β˜• 8 min read
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.

Let's Learn Go -- (4) Common Functions
· β˜• 3 min read
1. The main and init Functions A package can contain multiple init functions, but it must contain exactly one main function. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 package main import ( "fmt" ) func init() { fmt.

Let's Learn Go -- (3) Go Modules
· β˜• 2 min read
1. Go’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

Getting Started with Go
· β˜• 1 min read
English title: The Way To Go Subtitle: A Thorough Introduction To The Go Programming Language Author: Ivo Balbaert Publisher: iUniverse Publication year: 2012-3-8 ISBN: 9781469769165 Notes: This is a Go primer I would personally recommend. Because Go has evolved rapidly in recent years, parts of the original text are already out of date.

Let's Learn Go -- (2) Data and Logic Structures
· β˜• 3 min read
1. Go’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.