Category:Golang

  • Elegant use of brew to switch go version

    Time:2021-1-21

    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

    Time:2021-1-21

      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

    Time:2021-1-21

    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

    Time:2021-1-20

    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

    Time:2021-1-20

    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

    Time:2021-1-20

    This article is based on Ubuntu 16.04 First, post the official tutorial here https://github.com/tensorflow/tensorflow/tree/master/tensorflow/go 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

    Time:2021-1-19

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

  • Introduction to go get command

    Time:2021-1-19

    Go code is hosted in Github.com 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 code.google.com 、 bitbucket.org 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

    Time:2021-1-19

    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

    Time:2021-1-18

    @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

    Time:2021-1-18

    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

    Time:2021-1-17

    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 […]