This is the 11th day of my participation in Gwen Challenge

How do I submit patches to the Go repository?

The Go source library is located in the SRC directory of the code. If you want to make major changes, please send an email to discuss them before you begin.

For more information on how to contribute code to the Go repository see [Contributing to the Go Project](golang.org/doc/contrib…

It's exciting to embarkCopy the code

Why does go_get clone the repository using HTTPS connection?

Companies typically only allow traffic on standard TCP ports 80 (HTTP) and 443 (HTTPS) and block traffic on other ports, including TCP ports 9418 (GIT) and TCP port 22 (SSH). GIT enforces certificate validation by default when using HTTPS instead of HTTP, providing protection against man-in-the-middle, eavesdropping, and tampering attacks. Therefore, the GO GET command uses HTTPS for security.

Git can be configured to authenticate over HTTPS or to use SSH instead of HTTPS. To authenticate over HTTPS, you can add a line to the $Home /.netrc file of GIT Commerss:

machine github.com login USERNAME password APIKEY
Copy the code

The password of the Github account can become a token for personal communication permission

Git can also be configured to use SSH instead of HTTPS, using a URL with a given prefix. For example, to use SSH for all GitHub access, add these lines to your ~ /.gitconfig:

[url "ssh://[email protected]/"]
	insteadOf = https://github.com/
Copy the code

What is the size of int on a 64-bit machine?

The sizes of int and uint are different based on different implementations, but they are the same on the same platform. For neatness, use explicit sized types in your code, such as INT64. On 32-bit machines, the compiler uses 32-bit integers by default, whereas on 64-bit machines integers have 64 bits. (For historical reasons, this was not always the case.)

On the other hand, floating-point scalars and complex types have fixed sizes, and programmers should be careful about precision when using floating-point numbers. The default type for floating-point constants is FLOAT64. Thus, the Foo: = 3.0 expression declares a variable Foo of type Float64. If you want to initialize Float32, you must specify the specific variable type explicitly in the variable declaration, as follows:

var foo float32 = 3.0
Copy the code

Alternatively, the constants must be written as a similar conversion expression foo: = float32 (3.0)