Go language Development (eight), go Language program testing and performance tuning
Introduction of the Go Language Automation testing Framework
1. Introduction to Automated testing framework
The testing of the Go Language standard package provides a framework for unit testing (functional testing) and a common approach
Create a working directory Go-examples for the Go program, with an absolute path of/home/go-examples. Start writing our first down program.
First, create a file under the Go-examples hello.go
Copy Code code as follows:
Hello.go
Package Main
Import "FMT"//implementation of formatted I/O/*printf
This is a creation in
Article, where the information may have evolved or changed.
I. Why should I learn the go language?
Today, in the era of mobile and cloud computing, go is a time when industry transforms into cloud computing, with simple, efficient, built-in concurrency primitives and modern standard libraries that make the go language especially suitable for
search engine ElasticSearch.
Heroku Postgres – the best PostgreSQL hosting service.
MONGOHQ – personal favorite MongoDB database provider.
Openredis – I'll always use a Redis service provider that never loses data and has a strong ability to scale.
Deployment/Hosting
Heroku – a good hosting company.
Flynn – built on top of Docker, Heroku's strong competitor.
Mail
This is a creation in
Article, where the information may have evolved or changed. Easy-to-understand Go function with diagram Tutorial! [] (https://raw.githubusercontent.com/studygolang/gctt-images/master/go-funcs/funcs.png) * * NOTE: * * This tutorial only describes the Go function, Does not include: variable parameters, delay functions, external functions, met
for convenience, although I knew this was a big risk. Maybe using godep in the future may be a good solution.Build and deploy
Soundcloud directly uses go build to build the system during development, and then uses a Makefile to process the formal build.
Soundcloud is mainly used to deploy many stateless services. Similar to Heroku, soundcloud provides a simple method:
$ git push bazooka master$ bazooka sca
This is a creation in
Article, where the information may have evolved or changed.
The first two days have been concerned about the "go language combat" Finally took the hand, the book is looking forward to a long time, pre-sale time on the first scheduled. Yesterday's leisure time turned the first three chapters, feel good, so intends to target the book, write a series of reading notes, this is a summary of their own reading, but also with every
This is a creation in
Article, where the information may have evolved or changed.
The first two days have been concerned about the "go language combat" Finally took the hand, the book is looking forward to a long time, pre-sale time on the first scheduled. Yesterday's leisure time turned the first three chapters, feel good, so intends to target the book, write a series of reading notes, this is a summary of their own reading, but also with every
system, large construction projects still take time (for example, in one of the binaries, it took 45 minutes and now 27 minutes in 2007 years). The quality of life is still too low.
Into the Go language
We all want to have a higher quality of life, so we have to solve these problems, so we have the original idea:
Must be extensible
Suitable for a large number of dependent programs, large programs, large teams and
Must be accessible, such as
This is a creation in
Article, where the information may have evolved or changed.
On July 13, Russ Cox shared "The Future of Go" on Gophercon, reviewing the history of the go language and looking forward to go 2.
Rob Pike, Robert Griesemer and Ken Thompson discussed a new programming language for a while, and on September 25, 2007, Rob suggested that it be named
This is a creation in
Article, where the information may have evolved or changed.
The original is in this How go uses go to build itself, the author is Dave Cheney.
———— Translation Divider Line ————
How go is using go to compile your own
This article is based on a speech on the go
This is a creation in
Article, where the information may have evolved or changed.
Do we really need another C-style programming language in this world? It was clear that Google had thought so long ago that in 2009 it borrowed the song of the Ramones Band "hey! Ho! Let's go, officially launched the Go language. Now that the Go language development team has develop
This is a creation in
Article, where the information may have evolved or changed. Welcome to the 21st chapter of [Golang Series Tutorial] (HTTPS://STUDYGOLANG.COM/SUBJECT/2). In the previous tutorial, we explored concurrency and the differences between concurrency and parallelism. This tutorial will show you how to use Go Association (goroutine) to implement concurrency in the Go language. # # What is
construction projects still take time (for example, in one of the binaries, it took 45 minutes and now 27 minutes in 2007 years). The quality of life is still too low.
Into the Go language
We all want to have a higher quality of life, so we have to solve these problems, so we have the original idea:
Must be extensible
Ideal for large programs, large teams, and applications with a lot of dependencies
Must be accessible, such as near th
This is a creation in
Article, where the information may have evolved or changed.
http://www.aqee.net/go/a-tour-of-go/#5
"Go language Golang" A tour of Go: #1 Hello world!"Go language Tutorial" A Tour of Go: #2 Installing an offl
use of GODEP may be a good solution.
Build and deploy
SoundCloud uses go build to build the system directly during the development process, and then uses a makefile to handle the formal build.
Because SoundCloud mainly deploys many stateless services, similar to Heroku provides a very simple way:
$ git Push bazooka master$ Bazooka Scale-r
In this regard, we directly use a simple makefile to build
This is a creation in
Article, where the information may have evolved or changed.
This post was based on a talk I gave to the Sydney Go Users group in mid April describing the Go build process.
frequently on mailing list or IRC channel there is requests for documentation on the details of the Go compiler, runtime and internals. Currently the canonical source
This is a creation in
Article, where the information may have evolved or changed. Citing November 2014, Golang official blog post to commemorate the 5 anniversary of the Go language release. The article says that the go language has found its place in the era of cloud computing, predicting that "2015 will be the year of the rapid development of go language."
In N
coupled to your operating environment. I want to describe our scenario because I think it is a good model, but it may not be applied directly to your organization.
As far as construction is concerned, we usually develop directly using go build, and a Makefile is used to trim the official build. This is mainly because we are familiar with multiple languages, and our tools need to do a minimal functional collection (least common multiple). Also, our b
This is a creation in
Article, where the information may have evolved or changed. [Gopher] (https://raw.githubusercontent.com/studygolang/gctt-images/master/go-revel/20180323134353.png) The features of the Go language (Golang) are:-The standard library has many features, such as a network. -Easy to write concurrent programs. -Easy to manage executables (because there is only one file) 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.