• Elegant use of brew to switch go version


    Tips:It takes about 3 minutes and 42 seconds to read this article. Please give me more advice on the shortcomings. Thank you for reading.Subscribe to our website BrewIt’s a package management tool on MAC and Linuxapt 、yum、rpmSimilarly, it can provide the installation of non graphical software, which was used yesterday when building the strongest ide […]

  • Go singleton mode


      Wiki Encyclopedia: Singleton pattern, also known as singleton pattern, is a common software design pattern. When applying this pattern, the class of singleton object must ensure that only one instance exists. Most of the time, the whole system only needs to have one global object, which helps us coordinate the overall behavior of the […]

  • Examples of go receiving get / post parameters and sending get / post requests


    Golang: receive get and post parameters Get and post are the two most commonly used request methods. Today we will talk about how to correctly receive the parameter information of these two requests in golang service. Processing get requests 1.1 receive get request //Receive get request func Get(writer http.ResponseWriter , request *http.Request) { query := […]

  • About go flag.StringVar Or flag.String Can’t get the value


    Digression Many novices in the use of a new language development language, usually do not go to all the documents familiar with it, even read the document will inevitably have some details also did not notice. So the general novice in the use of new language development projects, usually through the search engine to solve […]

  • [go language series] configure the development environment of go in vscode


    1、 Why vscode The beginning of this series is to lead the company’s PHPer to go. Before writing this blog, let’s talk about the mainstream ides of go 1. GoLand (charge) JetBrains products must be a boutique, in addition to expensive, no other shortcomings, if you use this IDE, I just want to say go […]

  • Go version tensorflow installation tutorial


    This article is based on Ubuntu 16.04 First, post the official tutorial here Note that when installing the go version of tensorflow, you must first install the C version of tensorflow and deploy the go language C version of tensorflow official tutorial(go version tensorflow depends on tensorflow C Library) According to the official guidance, […]

  • Go get can’t download


    Set proxy (golang 1.13) 1、 Seven cattle cloud agent go env -w GO111MODULE=on go env -w GOPROXY=,direct 2、 Alibaba cloud agent go env -w GO111MODULE=on go env -w GOPROXY=,direct 3、 One time setting linux: export GOPROXY= windows: env:GOPROXY = “” This work adoptsCC agreementReprint must indicate the author and the link of this article

  • Introduction to go get command


    Go code is hosted in Site, the site is based on git code management tools, many famous projects are hosted in the site code. There are other similar hosting sites 、 And so on. There is a common standard for the project package path of these websites, as shown in the figure […]

  • Go memory model in detail


    introduce The go memory model specifies some conditions under which the value returned by reading a variable in one goroutine can ensure that it is the value written to the variable in another goroutine. It took me three and a half hours to translate this article Happiness before (happened before) In a goroutine, read and […]

  • Go practical preparation — the use of beengo


    @Go practical preparation — the use of beego I have discussed before whether to use beego or gin. In fact, gin is more efficient and more flexible than beego. Other frameworks are not included for reference. There are too few start, just like recruitment. Some enterprises that are not 985 / 211 do not look […]

  • Comparative analysis of golang socket and Linux socket


    After the introduction of POSIX standard, socket has been well supported on major mainstream OS platforms. Golang is a cross platform programming language with runtime. The socket API provided to developers in go is based on the native socket interface of the operating system. However, the socket interface in golang is different from the native […]

  • Summary of recent use of gin


    Recently, a new project is developed by using gin. Some problems are encountered in the process. To sum up, as a note, I hope it can help you. Cross domain problems Middleware: func Cors() gin.HandlerFunc { return func(c *gin.Context) { //Here you can use * or the domain name you specify c.Header(“Access-Control-Allow-Origin”, “*”) //Allow header […]