1. Download the SDK Toolkit: https://www.golangtc.com/download2. Install the SDK (decompression is possible);3. Configure environment variables (let the system help us to find the execution of the program, in any directory can be executed go command)
1. Install the Go Language SDK
Https://www.golangtc.com/download
2. Configure system variables this establishes the Goroot and Gopath two directories, respectively, corresponding to the directory where the SDK resides and the project file root
The idea of package management
The idea of package management is introduced in various languages, what is the role of it?
Easy Code Management
Increase the reuse of code
A concept of namespace isolation
...
The organization of the Go
Golang Engineer Job Responsibilities: 1, responsible for product platform system research and development work; 2, participate in the development of front-end business processes, interface protocols, document output, etc. 3, participate in project
If you're using a programming language like C # or Java to go, the first thing you'll find is that there's no traditional collection type like ' List ' and ' Dictionary '. It's been confusing me for months. I found a package called ' container/list '
The go language is Google's second open source programming language, which is optimized for programming of multiprocessor system applications, runs faster, is more secure, and supports parallel processes. In addition, it has the following advantages:
Recently in an online platform, architecture ideas are as follows
Architecture Evolution: 1, MVC 2, service split 3, microservices architecture 4, Domain driven design
1. MVC
This stage is mainly the rapid implementation of the product, did not
Each Go program is made up of some packages.
Original address: Https://golang-book.readthedocs.ioWelcome to our public number: Appetizer programming (Coding-fan)
The program main starts execution from the package.
package mainimport (
00 Introduction
What did bootstrap.sh help us with when we built the Fabric environment? , we know that bootstrap.sh has done three things for us:
Clone Hyperledger/fabric-samples from GitHub and enter the directory, then check out the
Generate Ethereum HD Wallet & offline sign && Broadcast signed TX to network. Solution for ETH cold wallet.
Install
Environment Require
Golang
Ethereum Private Chain
Dep
CGO or Xgo (for go-ethereum dependency)
MySQL (construct TX)
Error handling
The previous share added two functions, one is the editing function, one saves the function
There are a few places in our program that actually ignore the wrong deal.This is not a good practice, especially because of the unexpected
Download Linuxgo
01 Downloads Linuxgo.png
Go to Folder
02 go to folder. png
Open Terminal
03 Opening Terminal.png
Terminal interface
04terminal interface. png
Unzip the installation Go
05 Decompression and
Building a fabric network environment requires preparing the following environments, which are described in detail in the installation process.
Environment
Linux:ubuntu 16.04
golang:1.9+
docker:1.12+
fabric:1.1.0
Tools
Git
Curl
Three common methods for Golang string comparisons
fmt.Println("go"=="go")fmt.Println("GO"=="go")fmt.Println(strings.Compare("GO","go"))fmt.Println(strings.Compare("go","go"))fmt.Println(strings.EqualFold("GO","go"))
Output
truefalse-10true
1
First, the go language, as a programming language, was developed by Bell Labs in the United States. But in 2008, Google discovered the great potential of the go language, thus fully supporting the development of the Go language, based on Google's
Defer will often be used, but this pit is not for me to step on, because I usually do not use the name return parameters, one is not much necessary, and the second increases the difficulty of reading code. However, this pit can be a good way to
Preparation knowledge: MySQL transaction
1 Basic operations
Sql. Tx
TX takes an idle connection from the connection pool until the call to commit or rollback is released
tx, err := db.Begin() // 创建tx对象tx.Query(command1)tx.Exec(command2)tx.Commit()
2
Add Edit and save features
Continue to the previous article "Go Basic Learning Record-write Web application-add Edit and save function (i)"
If you build and run the logic of the previous article, trying to access a nonexistent wiki, such
//we also need to use the last var shallowproperty = function (key) { return function (obj) {return obj = = null? void 0:obj[key];}; }; First we have to figure out what the class array is to var arr = array ();//This is the real array with the
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