Because of the company arrangement, I temporarily moved from the Java project team to the Go Project team, after almost 5 days of spare time to go to study, the architect let me to the company colleagues Golang sharing and training.Colleagues were very passionate about technology, and were expected to share it for 40 minutes, which lasted 2 hours, thanks to the active discussion of colleagues and the enthusiastic addition of colleagues from the go big
Reference GOCN
Sometimes you need to turn the backend HTTP service into HTTPS, and you can use a proxy.
Reamark: If it is a Golang backend service, you can use the library Go-oryx-lib/https directly.
This agent supports self-signed certificates and also supports Letsencrypt certificates.
Remark:letsencrypt only support a small number of domain names, such as their own website, it will have the limit of the number of requests, the other CA is Letsencry
The problem with Oracle SDK compilation is well solved under MacOS and Linux, because GCC and pkg-config are both self-bringing programs. However, there are no two programs under windows that need to be installed on your own. The advantage is that MSYS2 has encapsulated two programs, configured as follows: Install MSYS2 tutorial as follows, point me to view. After the installation is complete, use the
Pacman-s Mingw-w64-x86_64-toolchain
Note: The default for direct use of the pacman–s GCC inst
A systematic review of Golang knowledge, today summarizes some of the characteristics of the channel and some simple implementation.Don ' t communicate by sharing memory;share memory by communicating.
1, the channel type itself is concurrency-safe, which is the only type of go that can meet concurrency security.2, the channel needs to be initialized because it is a reference type, otherwise its value is nil, and any operation on it will be blocked.3,
arrives.Setconnmaxlifetime ()If it is less than 0, it never expiresThe maximum life cycle for idle connections should be less than the time-out for database connections.When the connection is created or when the connection is pooled, the connection is timed out only in the connection pool.Conn ()Remove from the connection pool or create a connection to return. In the returned SQL. On the conn, the Ping,Exec,Query,QueryRow,Begin operation is on the current connection. Attention:Sql. The conn con
In the development of the program we will assume that the external provided interface or data is not trustworthy. For example, the function is always to check the correctness of the parameters, in the unit test to the external interface provided by the shield off and so on. It's hard to make sure that you or someone else can provide an interface without any flaws. Since the interface is written by people, then there is a little bit of thinking about it, and when the interface is called, it is po
This is a creation in
Article, where the information may have evolved or changed.
Some time ago using Golang to make an HTTP interface, because of the characteristics of the compiled language, modified the code needs to recompile the executable file, close the running old program, and start a new program. For users with a large number of access to the product, the shutdown, restart the process will inevitably appear inaccessible situation, thereby aff
Golang Development of HTTP services that support smooth upgrade (graceful restart)Some time ago using Golang to make an HTTP interface, because of the characteristics of the compiled language, modified the code needs to recompile the executable file, close the running old program, and start a new program. For users with a large number of access to the product, the shutdown, restart the process will inevitab
This is a creation in
Article, where the information may have evolved or changed.
In the grammar (i), we learn the basic elements of the basic data types, variables, constants, and so on in go, and in this section we will learn how to organize these elements and eventually write code that can be executed.
In this section include:
The Process Control statement in go;
The use of functions in go;
Go special error handling method;
Process Control statements in the
This is a creation in
Article, where the information may have evolved or changed.
Linear structure is one of the most commonly used data structures in computers. Whether it is an array (arrary) or a linked list (list), it is indispensable in programming. Golang also has arrays, unlike other languages, Golang also provides slices (slice). Slices have better flexibility than arrays and have some dynamic chara
appropriate, is too bloated, and lack of system programming genes, after all, it is enterprise-level development background
finally I chose Erlang, because it performs well in the network layer, while the fault-tolerant and robustness are very good, its virtual machine is the only one comparable to the JVM, but also the OTP super-heavyweight weapons, almost can be a network layer application, but according to my summary it has a mishap and a soft rib, This point behind the expansion, it can b
appropriate, is too bloated, and lack of system programming genes, after all, it is enterprise-level development background
Finally I chose Erlang, because it performs well in the network layer, while the fault-tolerant and robustness are very good, its virtual machine is the only one comparable to the JVM, but also the OTP super-heavyweight weapons, almost can be a network layer application, but according to my summary it has a mishap and a soft rib, This point behind the expansion, it can be
DEP Golang Package Management usage Records
DEP is one of the Golang project dependency management, is an official experimental project, the current update is very frequent in the high-speed development period, so the choice of DEP as a Golang dependency manager is more reliable. (Known glide only support no longer developing new features)
Currently DEP v0.5.0 re
This is a creation in
Article, where the information may have evolved or changed.
Deploying Golang apps to Docker
Project Address: Https://github.com/EDDYCJY/go ... (Get in the car, support a wave)Original address: Https://segmentfault.com/a/11 ...
Note:
You need to install docker and match the image source before you start.
This section of the source code on the f-20180324-docker branch
Start the project catalog from this section go-gin-e
This is a creation in
Article, where the information may have evolved or changed.
[TOC]
"Recorded in February 2018"
The concept of reflection in programming languages
In computer science, reflection refers to a class of applications that are self-describing and self-controlling. In other words, this kind of application uses some mechanism to realize the description (self-representation) and monitoring (examination) of its own behavior, and can adjust or modify the state and related semantics of
This is a creation in
Article, where the information may have evolved or changed.
When a new thing appears, it should be to solve some problems arise, otherwise there is no way to shift the focus of people, this is not nonsense. Lu Xun said that I have always been not afraid with the worst malicious to speculate on the Chinese people, but I still behold, also do not believe that the inferior ferocious to this point. Lu Xun also said that mass ignorance and forgetfulness are easily incited. I do
bloated, and the lack of system programming genes, after all, it is enterprise development origin of the last I chose Erlang, because it is excellent in the network layer performance, At the same time fault tolerance and robustness are very good, its virtual machine is the only one comparable to the JVM, but also the OTP super-heavyweight weapons, almost can be a Kill network layer application, but according to my summary it has a mishap and a soft rib, this point behind the expansion, It can b
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.