This is a creation in
Article, where the information may have evolved or changed.
[2012-05-19 translation from here , the original text has been expanded, but also some limitations. Copyright belongs to the original author, reproduced must retain
This is a creation in
Article, where the information may have evolved or changed.
First open the Install Go page: http://golang.org/doc/install.htmlFollow the wizard to install it step-by-step.My environment: Ubuntu9.10,acer Aspire4710 32-bit
This is a creation in
Article, where the information may have evolved or changed.
SUBLIMETEXT3 build the Go Language development environment (Windows)Download and unzip: Sublime Text Build 3021.zipRegistration: Try not to crackInstall the package
This is a created
article in which the information may have evolved or changed.
Go language Auto-complete code, need to add Gocode program.
Perform:
Go get Github.com/nsf/gocode
In general, Gocode source code will be in
This is a creation in
Article, where the information may have evolved or changed.
Recently, a book titled "Go Web Programming" appeared on the Web, detailing all aspects of Web programming using the go language. In particular, this book was written
This is a creation in
Article, where the information may have evolved or changed.
Package exec is used to run external commands, which encapsulate the OS. StartProcess, which makes the operation easier.
Index
Variables
Func lookpath (File
This is a creation in
Article, where the information may have evolved or changed.
1.0 controller GET Request
Type Maincontrollerstruct{Beego. Controller}func ( This*Maincontroller) Get () { This. data["Ishome"] =true This. data["Website"] ="s.me"
This is a creation in
Article, where the information may have evolved or changed.
The go language defines variables using the keyword VAR, such as: Var x int=4
can also be written x:=4;
In a function, a := concise assignment statement can be used as
This is a creation in
Article, where the information may have evolved or changed.
The syntax of method is as follows:
func (r ReceiverType) funcName(parameters) (results)
Let's do this in the first example using method:
package mainimport (" FMT ""
This is a creation in
Article, where the information may have evolved or changed.
Example
Package Mainimport ("Github.com/lxn/win" "StrConv" "Syscall") Func _text (_str string) *uint16 {return syscall. Stringtoutf16ptr (_STR)}func _tostring (_n Int3
This is a creation in
Article, where the information may have evolved or changed.
2013-12-08 WCDJ
In the Go language, you use Goroutine (a lightweight thread managed by the Go Runtime) to implement concurrent programs.
Go f (x, Y, z)
Starts a new
This is a creation in
Article, where the information may have evolved or changed.
The use of Glang for some time, the first actually did not like his grammar, but later familiar with the found that it is quite cool. Before the database has been
This is a creation in
Article, where the information may have evolved or changed.
How to use Google protocol buffer in the go language?
Now the trend is a button to do, as with Ubuntu installation software
Go get
This is a creation in
Article, where the information may have evolved or changed.
2014-1-25
When you design a MONGO database, you encounter a problem where the log information table needs to reference the data from the people information table. If
This is a creation in
Article, where the information may have evolved or changed.
1. Defining variables
There are many ways to define variables in Golang
Declared before use, if the defined variables are not used compile-time errorA.
/* Define a
This is a creation in
Article, where the information may have evolved or changed.
Install go language under Ubuntu
The go language is an open source project developed by Google, one of the purposes of which is to improve developer productivity. Go
This is a creation in
Article, where the information may have evolved or changed.
1. Goroot Gopath and PATH settings
A. adding system Variables Goroot: The first thing to do when you install Go is to set up goroot. For example, my go is installed
This is a creation in
Article, where the information may have evolved or changed. Original address: http://bbjava.iteye.com/blog/2004373
This article is intended for Linux.
First get the Go language kit download address:
This is a creation in
Article, where the information may have evolved or changed.
Synchronization between the Goroutine
Goroutine is a lightweight thread implemented at the language level in Golang and can be used to start a new thread just by using
This is a created
article in which the information may have evolved or changed.
1:beego template Syntax Guide: http://blog.go-china.org/03-beego-template
2:go language SUBLIMETEXT2 configuration:
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.