• GRPC Installation in Windows Environment


    Install ProtobufDownload the protoc installer at https://github.com/protocolbu… and select the appropriate version. The latest version is protoc-3.8.0-win64.zip. After downloading and decompressing, copy protoc.exe into the GOPATH bin directory. Install grpcSince the domestic network environment can not be installed directly by executing the go get google.golang.org/grpc command, it can only be installed in the following way:Create […]

  • Object-Oriented Learning Golang


    Everything is an object. Everyone who has studied Java programming knows that Java is an object-oriented language, which has the characteristics of encapsulation, inheritance and polymorphism. Can we say that a language with encapsulation, inheritance and polymorphism is an object-oriented language?Think about it carefully, that’s true, because encapsulation, inheritance and polymorphism are not the characteristics […]

  • Contrastive Learning: Golang VS Python 3


    Golang and Python are currently one of the most popular development languages in their respective fields. Golang’s efficient and friendly grammar has won the favor of many back-end developers and is one of the most suitable languages for high concurrent network programming. Python needless to say, the top ten permanent residents in the TIOBE rankings […]

  • Introduction and Use of httptest


    After the interface is written, it needs to be tested and provided in the golang standard library.httptestPackage to assist in testing. Because all interfaces need IP addresses or domain names to access.httptestService addresses are defined by default in packages const DefaultRemoteAddr = “” Important methods New Request NewRequestMethod is used to create an HTTP request […]

  • Analysis of the Implementation Principle of Go Channel


    Channel is a type of pipeline through which messages can be sent and received between goroutines. It is the way Golang provides communication between goroutines at the language level. As we all know, Go relies on a concurrent model called CSP (Communicating Sequential Processes) to implement this synchronization mode through Channel. The core philosophy of […]

  • Interesting, 5.20 Use Go to make an illustration / Let words dance


    Today I’m going to introduce you to an interesting piece of code.Generate pictures into textual patterns. Have you seen the GIF of the dancing girls in station B? With this code, you can make it yourself. GIF I am too lazy to do, as a back-end programmer, not too patient frame by frame screenshots, you […]

  • Go Gin Source Learning (V) Cardinal Tree Self-realization


    Gin Routing Main Process Implementation After the last learning note, we already know the main process of Gin Router. But we can see that the code and method body are generally very long, and most of them are the judgment of parameter routing. These scattered little logic makes it harder for us to understand the […]

  • Another go command line parameter processor – Cmdr


    cmdrIt’s another command line parameter processor (Golang). Golang has itflagsIt’s convenient to process command line parameters, but it’s very unique and anti-human, as Google has always done. In the history of computer human-computer interaction interface, there is only one way of command-line interaction that runs through the whole process and is inherited and continued, that […]

  • Go grabs web data and stores it in MySQL and returns JSON data


    In the previous section, the required data has been crawled from the website http://www.gratisography.com/and stored in the database.crawldata.goMediumInsertData(&imageDatas)Function, now you need to take the data from the databaseindiepicTablegratisographyIf you take it out, you will be able to take it out at the same time.jsonData in format. The project folder structure is as follows: indiepic ├── […]

  • Golang library collection


    data structure A library that improves business development efficiency by 10 times Gods data structure library tool Front-end Input Data Verification Toolkit Big gift package of resources Big gift package of resources

  • Source code parsing of golang HTTP server


    How to use HTTP package Using golang‘s http package, a web service can be easily implemented, as follows main.go package main import ( “log” “net/http” “runtime” “fmt” ) func foo(w http.ResponseWriter, r *http.Request) { w.Write([]byte(“hi! babe~”)) } func echo(w http.ResponseWriter, r *http.Request) { s := fmt.Sprintf(“gorotines count: %d”, runtime.NumGoroutine()) w.Write([]byte(s)) } func main() { mux […]

  • Summary of Block Chain Developer Tutorials, Php/Python/C#/Node/Go


    Mixin Network is a free, 1 second confirmed high-speed transfer network. We have written a series of multilingual tutorials that allow developers to build a Bitcoin collection application in 15 minutes. Course PHP Go Node.js C# Python Create a robot to receive and send messages php 1 Go 1 Node.js 1 C# 1 python 1 […]