Fully understand the declaration method of Golang slice, shallow copy phenomenon, deep copy and append operation

What is slicing A slice is a reference to a contiguous fragment of an array. Slice is a reference type. It doesn't actually store elements. It just identifies a continuous fragment on the array. An array is a series of memory spaces in memory, and each element occupies a piece of memory. The data structure of slice is a structure body, which c ...

Posted by Bleej on Tue, 30 Nov 2021 06:31:19 -0800

Discussion on Go configuration management

catalogueConfiguration classificationBest practicesconfiguration managementReference link1. Configuration classificationEnvironment configurationThe information that the application should determine during deployment should not be written in the configuration file or configuration center, but should be injected by the deployment platform when t ...

Posted by loosus on Mon, 29 Nov 2021 19:11:39 -0800

This paper explains the principle and implementation of consistent hash

Why do I need a consistent hashFirst, what is hashHash, generally translated as hash, or transliterated as hash, is to transform an input of any length (also known as pre mapping pre image) into a fixed length output through hash algorithm, and the output is the hash value. This transformation is a compression mapping, that is, the hash value s ...

Posted by smithmr8 on Mon, 29 Nov 2021 17:53:20 -0800

Understand Kubernetes Admission Controller

Hello, I'm Zhang Jintao.Articles published before me Container image security in the cloud native Era In (Series), I mentioned Kube apiserver, the core component of Kubernetes cluster, which allows components from end users or clusters to communicate with it (for example, query, create, modify or delete Kubernetes resources).In this article, we ...

Posted by terandle on Mon, 29 Nov 2021 17:39:51 -0800

Go language core 36 (go language practice and application 17) -- learning notes

39 | bytes packet and byte string operation (Part 2)In the previous article, we shared the general function of read count in bytes.Buffer and analyzed it around this problem. Let's expand the relevant knowledge.Knowledge expansionQuestion 1: what is the capacity expansion strategy for bytes.Buffer?The Buffer value can be expanded manually or au ...

Posted by rtown on Mon, 29 Nov 2021 16:40:08 -0800

Echo Framework: Turn on TLS/SSL

introduceWith a complete example, turning on TLS/SSL in the Echo framework is what we call https.We will use rk-boot To start the microservice for the Echo framework.Visit the following address for the complete tutorial:https://rkdocs.netlify.app/cnGenerate Self-Signed CertificateUsers can purchase certificates from major cloud vendors or use t ...

Posted by vidago on Mon, 29 Nov 2021 14:49:46 -0800

Practice of communication model based on channel

prefaceAs the data structure of Go core and the communication mode between Goroutine, Channel is an important structure supporting the high-performance concurrent programming model of Go language. This section will introduce the design principle, data structure and common operations of pipeline Channel, such as Channel creation, sending, receiv ...

Posted by spasme on Sun, 28 Nov 2021 23:52:47 -0800

Go language quick start notes 01

Language characteristicsSimple deployment:It can be directly compiled into machine code for executionDo not rely on other librariesRun directly to deployStatically typed languages: hidden problems can be detected at compile timeConcurrency at the language level: it naturally supports concurrency and makes full use of multi-corePowerful standard ...

Posted by Snake PHP on Sun, 28 Nov 2021 10:55:45 -0800

[docker series] docker learning VII, DockerFile writing and actual combat

Let's start learning about DockerFile DcokerFile is a file used to build a docker image. It is a command parameter script Steps to build a general docker image: 1. Write a dockerfile file 2. docker build builds into an image 3. docker run run image 4. docker push publish image (we can publish it to DockerHub or alicloud) Let's see how the offic ...

Posted by Kryptix on Sat, 27 Nov 2021 19:52:05 -0800

Go + Collection tutorial (4.3)

catalogue Go + overview Collection collection Index method Include method Any method All method Filter method Go + overview Go + is a branch of go and data science that integrates engineering development   Scratch in the field of Python and programming teaching combines the form of python with the heart of go, so that engineers d ...

Posted by Qlubbie on Sat, 27 Nov 2021 11:01:15 -0800