GRPC: quick create static file download Web service

introduce This article describes how to rk-boot Quickly build a static file download Web service. What is the static file download Web UI? Quickly build Web services that can download files through configuration files. Please visit the following address for a complete tutorial: https://rkdocs.netlify.app/cn install go get gi ...

Posted on Mon, 06 Dec 2021 23:32:21 -0500 by kevbev16

GoLanguage Core 36 Speech (GoLanguage Practice and Application 22) --Learning Notes

44 | Use the API in the os package (above) What we're going to talk about today is the API in the os code package. This code package gives us the ability to operate a computer's operating system. Leading content: API s in os packages This code package provides platform-independent APIs. So, what is a platform-independent API? It means that ...

Posted on Mon, 06 Dec 2021 13:13:35 -0500 by nodster

Source code analysis of golang reverse proxy

This article is reproduced from: Source code analysis of golang reverse proxy [source code attached]_ Dream siege lion_ 51CTO blog 1 example of reverse proxy based on reverse proxy package main import ( "log" "net/http" "net/http/httputil" "net/url" ) func main() { // Address rewrite instance // http://127.0.0.1:8888/t ...

Posted on Sun, 05 Dec 2021 17:34:54 -0500 by MerlinJR

gRPC call based on memory communication

Apache Dubbo has the communication mode of injvm, which can avoid the delay caused by the network and does not occupy the local port. It is a more convenient RPC communication mode for testing and local verification.Recently, I saw the code of containerd and found that it has similar requirements.However, there may be port conflicts when using ...

Posted on Sun, 05 Dec 2021 14:31:30 -0500 by argh2xxx

Golang time and date related functions

1, Basic introduction In programming, programmers often use date related functions, such as counting the time spent on the execution of a piece of code and so on. In Go, the developer provides us with a time package for displaying time and measuring usage (the Gregorian calendar is used for calendar calculation). For details, see: Golang's ...

Posted on Sun, 05 Dec 2021 00:45:53 -0500 by purencool

Review of Go Micro + Gin soft shutdown service (smooth shutdown service) at different levels I

Review of Go Micro + Gin soft shutdown service (smooth shutdown service) at different levels I The following is a summary of my chicken's handling of a soft stop service. What's wrong? Please help me correct it Service soft shutdown means that when closing a service, if there is a request being processed, you should wait for the request to be ...

Posted on Fri, 03 Dec 2021 16:22:42 -0500 by mattastic

Go language learning checking and patching Day2

Author: Regan YueSource: Hang Seng LIGHT cloud communityGo language learning checking and patching Day21, A note on the naming of function return parametersPlease observe the following function. Is there any problem?func fun(x, y int) (s int, error) { return x * y, nil }Although this error will be prompted in the integrated development envi ...

Posted on Fri, 03 Dec 2021 15:12:40 -0500 by journy101

Read TiDB source code with problems: Power BI Desktop connects TiDB with MySQL driver and reports an error

It is often said that reading source code is the only way for every excellent development engineer, but in the face of complex systems like TiDB, source code reading is a very huge project. For some TiDB users, starting from their daily problems, reading the source code is a good entry point. Therefore, we planned a series of articles on readin ...

Posted on Fri, 03 Dec 2021 13:09:55 -0500 by Anders_Scales

[Go] Init function and main function in Go language

1, init function 1. Function of init function The init function in go language is used for package initialization. This function is an important feature of go language. The main functions are: Initializes a variable that cannot be initialized with an initialization expression.Registration before running the program.Implement the sync. ...

Posted on Wed, 01 Dec 2021 16:48:42 -0500 by Domcsore

Building minimal web APIs using go spring

preface The go language is famous for its simplicity. An obvious example is that it requires very little code to implement a minimal Web API. Go Spring combines the advantages of go simplicity and Spring automatic configuration. This article demonstrates the simplicity and power of go Spring through several examples that implement the smallest ...

Posted on Wed, 01 Dec 2021 15:12:22 -0500 by gdboling