Get the current time
t := time.Now()
fmt.Printf("%T\n", t) //time.Time
fmt.Println(t) //2019-07-08 15:23:55.1114609 +0800 DST m=+0.000192401
Gets the specified time
t := time.Date(2009, 7, 15, 16, 30, 28, 0, time.Local)
fmt.Println(t) //2009-07-15 16:30:28 +0800 DST
Posted by dr_overload on Thu, 19 May 2022 20:50:19 +0300
Most bogey, hope to do a series of articles to record the process of brushing algorithm.
At present, it is mainly based on LeetCode https://leetcode-cn.com/circle/article/48kq9d/ The module of this post will brush the questions.
The content is mainly the summary of the landlord in the post, as well as some personal experience ...
Posted by shak123 on Thu, 19 May 2022 20:46:21 +0300
Go language variable scope
The scope is the scope of the constant, type, variable, function or package represented by the declared identifier in the source code.
Variables in Go language can be declared in three places:
Variables defined in a function are called local variables
Variables defined outside the function are called global varia ...
Posted by msnhockey on Thu, 19 May 2022 10:35:36 +0300
Linear Allocation (Bump Allocator)
The pointer points to a free memory address, and the update pointer is modified to allocate the next memory address.
Low complexity and high execution efficiencyMemory cannot be reused after being reclaimed
Need garbage collection mechanism, mark/copy/generational ...
Posted by kellz on Wed, 18 May 2022 21:45:55 +0300
Hello, today I will share with you the content of Go Language function usage combed out. Please give us some advice. Thank you.The content of Go Language Function Use is divided into three chapters, which is the third chapter.Use of Golang-based functions (1)Use of Golang-based functions (2)Use of Golang-based functions (3)Contents of this chap ...
Posted by chrisio on Wed, 18 May 2022 19:01:20 +0300
Wasmtime is made by bytecodealliance Small and efficient runtime for open source WebAssembly and WASI. It runs WebAssembly code outside the Web, both as a command-line utility and as a library embedded in larger applications.Has the following characteristics:
Lightweight. Wasmtime is a standalone runtime for WebAssembly that can be extended a ...
Posted by BraniffNET on Wed, 18 May 2022 18:57:47 +0300
What is Paxos distributed consistency protocol
The initial services are often provided externally through a single architecture, that is, single Server single Database mode. With the continuous expansion of business, the number of users and requests is rising. How to deal with a large number of requests has become a problem that every service n ...
Posted by Hybride on Tue, 17 May 2022 04:57:40 +0300
Original link: How the Go language detects goroutine leaks in testingforewordHello, everyone, I'm asong;As we all know, the design of goroutine is the core part of the concurrent implementation of Go language. It is easy to use, but it also encounters various intractable diseases. Among them, goroutine leakage is one of the serious problems. It ...
Some recent tossing insights.
Personal blog things
In fact, I started the construction of personal blog website from a very early time, which initially benefited from GitHub Opening of IO domain names. In general, the history of building my blog is mainly divided into three stages.
The first stage belongs to simplicity supremacy. Us ...
Posted by ngu_tri on Mon, 16 May 2022 15:58:17 +0300
This is HTTP 2 0 series, the author recommends reading in the following order:
HTTP request in Go -- http1 1 request process analysis
Go launched http2 0 request process analysis (previous)
Go launched http2 0 request flow analysis (Part 2) -- data frame & flow control
In the previous article (* http2clientco ...
Posted by brandone on Mon, 16 May 2022 09:17:40 +0300