Learning Goang Type Assertions

There is a serialize() function in php that serializes arrays into strings for storage and transmission. If you want to deserialize this string, you only need a simple unserialize() function in php. But it's not so easy in golang. It takes a lot of effort to write a lot of code. At this time, I just want to sigh that php is really the best lang ...

Posted by Kathy on Mon, 03 Jun 2019 23:24:04 +0200

File Operation for Go Language Defragmentation

What is a file?Files in a computer are a collection of data stored on external media (usually disk), which are divided into text files and binary files. Open and close files The os.Open() function can open a file and return a *File and an error.Calling the close() method on the resulting file instance closes the file. func main(){ file,err ...

Posted by blackbeard on Mon, 03 Jun 2019 23:06:09 +0200

Go Redigo Source Analysis Implements Protocol Protocol Request redis

Summary Redis is the most common Nosql used in our daily development and is a key-value storage system, but redis supports not only key-value, but also many storage types including strings, chain tables, collections, ordered collections, and hashes.There are many open source libraries available in go using redis, and I often use redigo, which e ...

Posted by ahmed17 on Fri, 24 May 2019 18:46:39 +0200

golang foundation (33) exception handling

golang_real.jpg Beginners tend to ignore exception handling in the program, thinking that the program is always running in a cared-for environment, without any wind or rain, because we are the most knowledgeable people of our program. So we know what he likes, what he can eat and what he can't eat. But one day he returned to ...

Posted by spartan789 on Fri, 17 May 2019 14:49:32 +0200

Go Gin Source Learning

radix tree This time we're learning about routing in Gin. In learning about source code, one of the things we see about Gin's routing is its feature.However, the use of cardinality trees in the underlying data also provides performance protection.Because this part of routing is relatively independent and logical, it needs to be learned independ ...

Posted by dannyz on Fri, 17 May 2019 03:01:50 +0200

Go Scheduler Series Source Code Reading and Exploration

Dear friends, this time I would like to share with you the knowledge and experience related to the source code reading of Go Scheduler. There are many good articles on the network to analyze the source code. So this article is not another source code analysis article. It is not about the source code analysis and sharing, but to bring you some l ...

Posted by lkq on Thu, 09 May 2019 05:33:02 +0200

golang network programming

square-gopher.png Http requests are a stateless communication model that may sound confusing to beginners.Statelessness here means that each request is independent and independent of each other.Each request is not affected by the last request. Provide two components in the net/http module to handle Http requests. golang_ ...

Posted by sintax63 on Thu, 09 May 2019 04:00:04 +0200

[uber-zap/part2] custom recorder

Explain A previous translation of a tutorial (without backing up the original address, the ladder was sealed). Add the original address after finding it text Using the default recorder saves time, but if you decide to adjust the recorder, you need to explore ways to customize the recorder Using zap configuration structure to create recorders Yo ...

Posted by pbase on Mon, 06 May 2019 17:40:03 +0200

Overview of the Type System of Go Language

This article will introduce various concepts in go language and go type system. Without knowing these concepts, it will be difficult to understand go language. Concept: Basic Types The built-in types in go have been introduced in Built-in Basic Types and Values. For the sake of completeness of this article, the built-in basic types ...

Posted by imnu on Mon, 06 May 2019 15:25:03 +0200

Bitcoin Development Course in Go Language Based on Mixin Network: Creating Robots

Mixin Network It is a free and extremely fast end-to-end encrypted digital currency trading system.In this chapter, you can create a bot in Mixin Messenger to receive user messages according to the tutorial, and learn how to transfer a bit coin to a robot or to a robot to transfer a bit coin to you. Mixin Network Development Resource Compilatio ...

Posted by Killswitch on Sun, 05 May 2019 21:40:03 +0200