Message Queue NSQ with You to Get Started

I've seen NSQ before and haven't seen it yet.Just when I have time today, I set up a simple try to get the message queue NSQ in this Go Language, which I'll briefly record here. In fact, NSQ is used relatively little in China. I think I know such a thing here. Just look at the source code a little and learn something. Introduction to NSQ NSQ i ...

Posted by CentralOGN on Sun, 22 Mar 2020 10:30:03 -0700

json operation for Golang

JavaScript Object Representation (JSON) is a standard Protocol for sending and receiving structured information.JSON is not the only standard Protocol among similar protocols.XML (7.14), ASN.1, and Google's Proocol Buffers are similar protocols and have their own features, but JSON is the most widely used because of its simplicity, readability ...

Posted by GregArtemides on Sun, 22 Mar 2020 00:00:01 -0700

Quick start to golang [8.2] - Secrets of automatic type inference

Preceding text Quick introduction to golang [1] - Introduction to go golang quick start [2.1]-go language development environment configuration windows golang quick start [2.2]-go language development environment configuration - macOS golang quick start [2.3]-go language development environment configuration linux Get started with golang [3]- ...

Posted by KILOGRAM on Sat, 21 Mar 2020 08:26:47 -0700

Getting started with Go language - process control

go process control String explanation String principle The bottom layer of string is a byte array, so it can be converted to and from [] byte type Characters in a string cannot be modified String is composed of byte, so the length of string is the length of byte The run type (int32 in four bytes) is used to represent utf8 characters. A run co ...

Posted by fredted40x on Sat, 14 Mar 2020 08:37:41 -0700

Go language - package static files

For the developers of Go language, while enjoying the convenience of the language, we are also keen on the final compilation of a single executable. However, Go did not compile our static resource file when compiling into binary file. If we are developing web application, we need to find a way to compil ...

Posted by burfo on Thu, 12 Mar 2020 02:21:59 -0700

One article on the four main uses of Go Language Select

This article introduces you to the use of Select in the Go Language and believes that you are not unfamiliar with switching. However, select and switching have a common feature that they both handle things in a case way, but select and switching handle things completely different and incompatible.Let's see what switching is like: various types ...

Posted by wafawj on Tue, 10 Mar 2020 10:28:21 -0700

go to implement java virtual machine 02

In the previous article, the command-line parameters are parsed through the flag package. In fact, the input parameters are saved in a structure. In the previous article, for example, the command java -classpath hello.jar HelloWorld, how can the HelloWorld class be found? Is it directly found in hello.jar? Remember java's class loading mechanis ...

Posted by jeancharles on Thu, 27 Feb 2020 23:31:24 -0800

Translation of official documents of Alertmanager

original text Abridged slightly Alarm overview Prometheus alarms are divided into two parts. Alarm rules in Prometheus server send alarms to alert manager, which processes these alarms, including silence, inhibition, aggregation, and sending notifications through email, online notification system and ...

Posted by senatedc on Thu, 27 Feb 2020 18:28:46 -0800

Go Language Self-Study 18: Process Control Paper

There are so many process control methods in Go: if - else conditional statement switch - case selection statement for - range loop statement goto unconditional jump statement Defer defer execution if-else conditional statement if condition 1 { Branch 1 } else if conditio ...

Posted by nologin666 on Fri, 14 Feb 2020 23:13:08 -0800

Go language defer and recover

1.defer is the code segment executed when the function returns. Whether it is return or panic, the code snippet in defer will be executed. 2.recover is used to capture panic in the defer code segment. When panic occurs, the defer code segment will be executed, in which if recover is available, The panic will be captured and use ...

Posted by Dongowarrior on Thu, 13 Feb 2020 12:45:04 -0800