Gin framework notes

Environment construction and installation Set proxy image Due to the slow speed of accessing GitHub and possible permission problems, we need to set up a proxy go env -w GOPOXY=https://goproxy.io,direct Download the gin framework go get -u github.com/gin-gonic/gin First code func main() { r := gin.Default()//Engine initialization ...

Added by chancho on Mon, 24 Jan 2022 03:24:49 +0200

golang learning notes 007 -- functions, packages and error handling

1. Function func Function name (parameter list ) (Return value list){ Execute statement... return Return value list } 2. Package ● Three functions of package ○ Distinguish functions with the same name,Variable identifier ○ When there are many program files,Can manage the project well ○ Control function,Variable and other access ...

Added by scraptoft on Sun, 23 Jan 2022 22:25:14 +0200

Introduction to Kubernetes client go

introduce Since August 2016, kubernetes officials have extracted the core source code related to kubernetes resource operation and created an independent project client Go. Kubernetes uses client Go as the official programming interactive client library of Go language to provide interactive access to api server services. For the secondary deve ...

Added by malikah on Sun, 23 Jan 2022 14:14:39 +0200

Basic use of variables in Golang series

1. Definition of variables No matter which high-level language is used, variables are the basic unit of the program. Variable means that in memory, the program can apply for a piece of data storage space by defining a variable, and then use this storage space by referencing the variable name. 2. Steps for using variables Declare variableInit ...

Added by astarmathsandphysics on Sun, 23 Jan 2022 09:10:00 +0200

Hyperledger Fabric development -- developing user chain code

preface The code of this series of articles is in Go language. Hyperledger Fabric development -- preliminary understanding of smart contract (chain code)Hyperledger Fabric development -- developing user chain codeHyperledger Fabric development -- testing user chain code (to be updated) Chain code file chaincode Basic structure of go First, ...

Added by stridox on Sun, 23 Jan 2022 00:24:09 +0200

Day2 - GO environment installation

100day Institute golang series: https://github.com/qisenshi/Go-100-Days Updating continuously Download Go Download address: Go official website download address: https://golang.org/dl/ Go official mirror station (recommended): https://golang.google.cn/dl/ It is recommended to download the executable version on Windows platform and Mac pl ...

Added by jclarkkent2003 on Sat, 22 Jan 2022 12:28:53 +0200

Go language Bible - Chapter 9 concurrency based on shared variables - 9.7 example: concurrent non blocking cache

Chapter 9 concurrency based on shared variables In the previous chapter, we used direct and natural methods such as goroutine and channel to implement concurrency. Sometimes they have some problems In this chapter, we will introduce the concurrency mechanism in more detail, especially the sharing of variables between goroutines. We will also ...

Added by ManOnScooter on Sat, 22 Jan 2022 11:09:47 +0200

Object oriented programming in Go language

1, Basis of structural variable method Structural variables not only have their own attributes, but also have their own methods. For example, a person not only has a name and age, but also has some behaviors. These behaviors can be understood as methods in structural variables. The methods in Golang are bound to specific data types, so it's not ...

Added by egiblock on Sat, 22 Jan 2022 05:31:47 +0200

Take you ten days to easily complete the Go micro service series

At the beginning of this article, we will publish a series of articles to show you a go zero micro service example in detail. The whole series is divided into ten articles, and the directory structure is as follows: Environment construction (this article) Service splitting User services Product service Order service Payment services RPC servic ...

Added by giraffemedia on Sat, 22 Jan 2022 01:38:04 +0200

Take you ten days to easily complete the Go micro service series

preface We will show you a go zero micro service example in detail through a series of articles. The whole series is divided into ten articles, and the directory structure is as follows: Environment constructionService splittingUser services (this article)Product serviceOrder servicePayment servicesRPC service Auth authenticationService monit ...

Added by Galia on Fri, 21 Jan 2022 09:34:11 +0200