The analysis of the reading phenomenon of the database has been introduced, in the case of concurrent access, there may be dirty read, non-repeatable read and read the Phantom read phenomenon, in order to deal with these problems, the mainstream
Bash Shell Common shortcut keysOriginal: Https://github.com/hokein/Wiki/wiki/Bash-Shell%E5%B8%B8%E7%94%A8%E5%BF%AB%E6%8D%B7%E9%94%AEMove cursor
ctrl+b: Move forward one character (backward)
ctrl+f: Move back one character (forward)
For Go language developers, while enjoying the language convenience, the final compiled single executable file is also our passion. However, when it comes to what we need to distribute and not just the executable, things get a little bit more
This is a created
article in which the information may have evolved or changed. The code below, according to the logic below slice after unpacking should be no problem, but the following code, there are two error "" ' Gopackage mainfunc demo1
This is a creation in
Article, where the information may have evolved or changed.
Problems encountered without using glide
If your project a relies on multiple projects b1,b2,b3, and B1,B2,B3 relies on other projects c1,c2 .... A project
This is a creation in
Article, where the information may have evolved or changed.
Code logging
Program Structure Directory
--------Package
Interface { dobalance ([]*instance, ... string) (*Instance, error)}
Balance.go
Package Balanceimport
This is a creation in
Article, where the information may have evolved or changed.
1. Reflection: Can dynamically get information about variables at run time
Import ("reflect")
Two functions:
Reflect. TypeOf ()//Gets the type of the variable and
This is a creation in
Article, where the information may have evolved or changed.
Service-side codePackage Mainimport ("FMT" "Net" "Log" "OS" "Encoding/binary") func main () {//socket, listening port Netlisten, err: = Net. Listen ("TCP", "localhost:8
This is a creation in
Article, where the information may have evolved or changed. **RSA Encryption and Decryption * * **[generate RSA key] (https://studygolang.com/articles/12219) * * ' Golangpackage cryptoimport ("Crypto/rand" " Crypto/rsa ""
This is a creation in
Article, where the information may have evolved or changed.
Golang String goto Urlcode
Recently, due to the invocation of the Gitlab API, when generating some strings, the direct request of the Gitlab API failed, the URL is as
This is a creation in
Article, where the information may have evolved or changed.
Synchronization is suitable for multiple consecutive executions, each step of execution is dependent on the previous action, and asynchronous execution is independent
This is a creation in
Article, where the information may have evolved or changed.
Golang Support cross-compilation, on one platform to generate another platform executable program, recently used, very useful, here is a memo.
Linux and Windows
This is a creation in
Article, where the information may have evolved or changed.
The use of the method, see the code of this fearless
// method Definition of Golang // the methods in Golang are used on certain types of variables, so custom types
This is a creation in
Article, where the information may have evolved or changed.
In the actual project found that everyone's directory structure is more messy, basic everyone has the style of each person, a project is constantly getting bigger,
This is a creation in
Article, where the information may have evolved or changed. **1**. Basic concept of data structure in a computer, we can use a number of "bits" together to form a bit string to represent a data element, for example, a string
This is a creation in
Article, where the information may have evolved or changed.
Process and thread A. A process is a process in which a program executes in an operating system, and the system performs a separate unit of resource allocation and
This is a creation in
Article, where the information may have evolved or changed.
Basic example:
package main // definition error // error is also an interface import ( errors " " fmt " var errnotfound error = errors. New ( " not found
This is a created
article in which the information may have evolved or changed. "' Gopackage mainimport (" Encoding/json "" FMT ") var h map[string]stringfunc Init () {h = map[string]string{" a ":" AA "," B ":" BB ",}}func Main () {//Copy map does
This is a creation in
Article, where the information may have evolved or changed.
The following main description of the Go Language program structure.
I. Definition specification of Name
This includes functions, variables, constants, types,
This is a creation in
Article, where the information may have evolved or changed.
Gorose, the most coquettish go Orm, has a chain operation, out of the box, a minute to get started, such as eight big coquettish, let Golang operation database become
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.