ImportOrg.springframework.context.ApplicationContext;ImportOrg.springframework.context.support.ClassPathXmlApplicationContext;ImportJava.text.SimpleDateFormat;ImportJava.util.Calendar; Public classTest2 { Public Static voidMain (string[] args)
1. data type conversion FunctionsConvert.toxxx ();Xxx. Parse ();Xxx. TryParse ();2. Date-dependent classes and functionsGet system current date (including time): DateTime.NowGet system current date (not including time): Datetime.todayGets the year,
This is a creation in
Article, where the information may have evolved or changed.
First Program
package mainimport "fmt"var s = "hello" //全局变量func main() {fmt.Println(s, "world")}
go run hello.goOutput
hello world
2.1 Variables
Go uses the keyword
This is a creation in
Article, where the information may have evolved or changed.
Install go under Mac
Easy to manage and upgrade based on Homerbrew installation
brew install go
Configuration path
vim ~/.bash_profile
#export PATHexport
This is a creation in
Article, where the information may have evolved or changed.
Stack is like a water cup in-first out, the chain of the stack in the back element of the next always point to the advanced element, the top element of the stack is
This is a creation in
Article, where the information may have evolved or changed.
1.Go built-in keywords and annotation methods
break default func interface selectcase defer go map structchan else
This is a creation in
Article, where the information may have evolved or changed.
First, preface
dockerIt is not here to introduce, the relevant documents have been very perfect, Chinese document docker--from the introduction to practice writing is
This is a creation in
Article, where the information may have evolved or changed.
First, what is the interface
The
interface type is an abstract type that describes a collection of methods.
Interface convention: The method
This is a creation in
Article, where the information may have evolved or changed.
1.moby/moby
Docker's new vest
2.kubernetes/kubernetes
Distributed container Management
3.grafana/grafana
A visualization panel with a beautiful dashboard, a variety of
This is a creation in
Article, where the information may have evolved or changed.
Project Address:
Https://github.com/alibaba/jsonq
Sample JSON
{ "Foo":1, "Bar":2, "Test":"Hello, world!.", "Baz":123.1, "Array": [ {"Foo":1},
This is a created
article in which the information may have evolved or changed.
Topic
Output:413
Explain
When a function has a named result parameter, the initial value of the resulting parameter is set to the zero value, and the return
This is a created
article in which the information may have evolved or changed. Today into JD See Programming column directly is: Title is: **2017 must learn go language **! []
This is a creation in
Article, where the information may have evolved or changed.
Project background
An enterprise is a focus on the car networking, video CDN technology and other applications of scientific and technological innovation enterprises,
This is a creation in
Article, where the information may have evolved or changed.
The general go language is to write the server, is mainly the easy way to write the thread of the process.
and Unity3d to communicate.
Main code
func main() {Addr, _
This is a creation in
Article, where the information may have evolved or changed.
1. Pipe Chan throughput limit 10,000,000, a single put,get time consuming about 100ns/op, whether it is a single go, or more go concurrency (Concurrency: 100, 10000, 10
This is a creation in
Article, where the information may have evolved or changed.
1. Basic knowledge Supplement (pointer, increment decrement statement)
Pointer
Go retains pointers, but unlike other programming languages, pointer operations
This is a creation in
Article, where the information may have evolved or changed.
1. Definition of constants
The value of the constant is confirmed at compile time
Constants are defined in the same format as variables
The right side of
This is a creation in
Article, where the information may have evolved or changed.
As Android development matures, a variety of Android-related development tools emerge every day, but the kinds of libraries we use every day are always essential. Here,
This is a created
article in which the information may have evolved or changed.
package mainimport ("fmt""strings")func main() {a := "大大1122佛挡杀佛大大"c := Substr(a, "大大1", "杀")fmt.Println(c)}func Substr(str, startStr, endStr string) string {s :=
This is a created
article in which the information may have evolved or changed.
1. Download the installation package
https://dl.gocn.io/golang/1.9/go1.9.linux-amd64.tar.gz
2. Unzip and perform the following actions
tar -C /usr/local -xzf
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.