[Series] - go-gin-api routing Middleware - catch exceptions

Summary Firstly, the project overview is synchronized: Last article shared, routing Middleware - logging, this article we share: routing Middleware - catch exceptions. When the system is abnormal, prompt "system abnormal, please contact the administrator!" At the same time, panic alert mail is sent. What is an exception? The excepti ...

Posted by mcubedma on Wed, 11 Sep 2019 07:04:23 +0200

Configuration of golang module in space MCS

Summary Goang's official package management has been supported since version 1.11. Several attempts have been made before, but the results are not satisfactory, and dep has been used to manage the package. With the release of version 1.13 recently and the increasing number of official management methods using go module, dep has not been develop ...

Posted by zeeshan_haider000 on Wed, 11 Sep 2019 06:40:29 +0200

An in-depth understanding of Go-runtime.SetFinalizer principles

A finalizer is a function associated with an object, set by runtime.SetFinalizer, that is called when the object is GC to complete the last step in the object's life.The existence of finalizer makes it impossible for an object to be marked as white in a trichrome marker, i.e. garbage, so that the life of the object can continue for a GC cycle.J ...

Posted by usawh on Sun, 08 Sep 2019 06:09:04 +0200

Deeply Understanding the Principle of Go-defer

Defer is also a special key word in Go, which is mainly used to ensure that in the process of program execution, the function behind defer will be executed, generally used to close the connection, clean up resources and so on. 1. Overview of structure 1.1. defer type _defer struct { siz int32 // Size of parameters started bool // ...

Posted by trrobnett on Fri, 06 Sep 2019 06:28:18 +0200

Using the Go module

brief introduction Go will finally have its own modules. Previously, only packages were available, and modules were the parent of packages. Below is a summary of the two articles you read on the official website. https://blog.golang.org/using... https://blog.golang.org/migra... Using the Go module A module is a collection of Go packages store ...

Posted by BillBillJr on Sat, 31 Aug 2019 22:07:41 +0200

[GO Development Series - Foundation] Introduction to Go Foundation

[GO Development Series - Foundation] Introduction to Go Foundation The Characteristics of Golang Language The Go language not only has the security and performance of static compiler language, but also has the high efficiency of dynamic languag ...

Posted by garygay on Thu, 22 Aug 2019 13:13:45 +0200

Channel Channel Channel

The first part of the Go tutorial series Notebook Interface Part 2 of the Go tutorial series Notebook Interface Go tutorial series notes concurrent introduction Go tutorial series notes goroutine Go tutorial series notes Channel channel Go Tutorial Series Note Buffer Channel and Work Pool Go Tutorial Series Notes Select Go tutorial series note ...

Posted by seavolvox on Wed, 14 Aug 2019 11:22:50 +0200

[JVM] LXF Deep Understanding of JVM Theme (1-4)

Links to the original text: https://mp.weixin.qq.com/s?__biz=MzAxOTc0NzExNg==&mid=2665513667&idx=1&sn=26d2585a465a0cce1595b88a0fe959b3&chksm=80d67a80b7a1f39643d16fab2174a6048359a1f161ff882d6172178eabe22c3584c0f6e82579&scene=21#wechat_redirect ...

Posted by BlaineSch on Tue, 13 Aug 2019 12:19:34 +0200

A weekly algorithmic problem: change change change

Questions: Known convertible change types are 1 yuan, 5 yuan, 10 yuan, 20 yuan 4 kinds, now there are 100 yuan to change into change and the total amount is less than 15 pieces, how many kinds of exchange? What are the differences? Ideas: Known as a n optional data set S, such as [1, 5, 10, 20], we now need to extract n numbers from it, the te ...

Posted by jdc44 on Thu, 08 Aug 2019 14:10:37 +0200

How to Use set in Go

Today let's talk about how Go uses set. This article will cover set and bitset data structures. The Data Structure of Go There are not many built-in data structures in Go. In our work, the two most commonly used data structures are slice and map, namely slicing and mapping. In fact, there are arrays in Go. The bottom of slices is arrays, but be ...

Posted by jdubwelch on Thu, 01 Aug 2019 04:23:53 +0200