Principle
About Golang The writing order of field in the same struct will be different for different memory allocation sizes. The main reasons are as follows: The field memory allocation within a struct is based on 4 B and must be exclusive at 4B.
1. Slices vs. arrays
(1). ArrayAn array is a sequence that has a fixed length and has 0 or more elements of the same data type.The length of the array is part of the array type, so [3]int and [4]int are two different types of arrays.(2). SlicingA
The technology stack used by Hangzhou head office
Golang Gateway (front background routing, anti-crawler, authentication) Go language is better for high concurrency support
Python-related projects for data processing,
Java Web, micro-service
Background
To do IP address attribution to query, the volume is large, so I want to find most of the distribution data from the Internet, write a spider program to crawl the storage, in the process of the operation of continuous maintenance, update,
Background
To do IP address attribution to query, the volume is large, so I want to find most of the distribution data from the Internet, write a spider program to crawl the storage, in the process of the operation of continuous maintenance, update,
Select the principle of sorting:
Each time from the rest of the number to find the smallest, side to the beginning of the remaining number.
package mainimport "fmt"func main() { numbers := []int{6, 2, 7, 5, 8, 9} SelectSort(numbers)
Package
Go language has been wrapped as a management unit
Each file must be declared first: package
Each file must consist of a main package
Import for importing libraries
The referenced library must be used
Entry
-1. Download go: Address is https://golangtc.com/download
-2. Install: English version, always click Next
-3. Check if the installation is successful:
-3.1 Cmd:a.go version #查看版本
-4. Test environment: Create a Hello.go file with the following
The first two days, in the Drip interview, was asked to achieve priority in select, but know that the event in select is triggered randomly, did not think how to implement, the interviewer told you can use the default implementation, think of the
Problem 1:glide Install | Unable to checkout Golang.org/x/crypto | Cannot detect VCS
WORKAROUND: Glide Mirror set https://golang.org/x/crypto https://github.com/golang/crypto--vcs git
The generated mirrors.yaml is stored in the user directory.
1. Installation
sudo apt-get install golang-go
2. Configure Environment variables
Suppose my go script is stored under ~/home/steven/code/gocode/, according to Go's workspace design, in the following order to store SRC, pkg, bin directory,
Today to use the Beego framework, in the installation environment encountered a lot of small white errors, here to share my mistakes, to avoid more like me small white walk so many detours
Install the Environment first:
Official documents
go get
Project Address: Https://github.com/chenhg5/go ...
Sometimes in order to make better use of the computer resources, we can put some time-consuming task queuing asynchronous execution. To give a simple example of life is the majority of restaurants
The third parameter of Golang make ()
Study for a period of time Golang, probably can use Golang to do some small things, so review some of the basic things. Golang allocated memory has a make function, the first parameter of the function is the
Goroutines
Goroutine is the most basic execution unit in go. In fact, every go program has at least one goroutine: the main goroutine. When the program starts, it is created automatically.
In fact, Goroutine employs a fork-join model.
sayHello :=
Recently in many places to see the golang of the face of the test, see a lot of people on the golang of the face of fear, but also to review the basis, I put the process of solving the problem summed down.
Interview questions
1. Write out the
Go provides only a loop, that is, a for loop, which can be used in the same way as C, or it can for range traverse container types such as arrays, slices, and mappings. However, for range when used, if used improperly, there will be some problems,
1. Select the framework first, and feel that the application of the blog class is suitable for Beego this mature MVC framework.Or it can be completely separated from front to back, using the Vue framework for the frontend, and the backend using the
Full Name: Germany Fang Zhi chain Technology (Shenzhen) Co., Ltd.
Date of establishment:May 8, 2018
Job Openings : Blockchain Development Engineer
Salary Treatment:30-50k
Recruitment requirements:
Gang bit Responsibilities
1. Responsible
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service