【译】Part 1: 介绍和安装

原文地址: Part 1: Introduction and Installation
原文作者: Naveen R
译者:jacsice 转载请注明出处。更多进阶译文请查看咔叽咔叽

这是golang入门系列里面的第一篇。

什么是 Golang

Go 就是Golang

is an open source, compiled and statically typed programming language created by google.

The primary focus of Golang is to make the development of highly available and scalable web apps simple and easy.

是google创造的开源的,可编译的,静态类型的编程语言。

Golang的主要关注点在于使开发高可用的,可扩展的web apps简单便捷。

Why Golang

Why would you choose Golang as your service side programming language when there are tonnes of other languages such as python, ruby, nodejs... that do the same job.

Here are some of the pros which I found in choosing Go

  • Concurrency is an inherent part of the language. As a result writing multithreaded programs is a piece of cake. This is achieved by Goroutines and channels which we will discuss later in the upcoming tutorials.
  • 并发是该语音与生俱来的部分。使得写多线程的程序小菜一碟。这些是通过goroutines和channels完成的。
  • Golang is a compiled language. The source code is compiled to native binary. This is missing in interpreted languages such as JavaScript used in nodejs.
  • Golang是一种编译语言。源代码被编译为二进制文件。在诸如nodejs中使用的JavaScript之类的解释语言中缺少此功能。
  • The language spec is pretty simple. The entire spec fits in a page and you can even use it to write your own compiler :)
  • 语言的规范非常简单。全部的规范都在这一个页面里面,你甚至可以用它来当做你的编译器。
  • The go compiler supports static linking. All the go code can be statically linked into one big fat binary and it can be deployed in cloud servers easily without worrying about dependencies.
  • go编译器支持静态链接。所有go代码都可以静态链接到一个大的二进制文件中,并且可以轻松地部署在云服务器中,而不必担心依赖性。

Installation

Golang is supported on all the three platforms Mac, Windows and Linux. You can download the binary for the corresponding platform from golang.org/dl/

Mac OS

Download the OS X installer from golang.org/dl/. Double tap to start the installation. Follow the prompts and this should have Golang installed in

/usr/local/go

and would have also added the folder

/usr/local/go/bin

to your PATH environment variable.

Windows

Download the MSI installer from golang.org/dl/. Double tap to start the installation and follow the prompts. This will install Golang in location

c:\Go

and will also add the directory

c:\Go\bin

to your path environment variable.

Linux

Download the tar file from golang.org/dl/ and unzip it to /usr/local.

Add /usr/local/go/bin to the PATH environment variable. This should install go in linux.


转载于:https://juejin.im/post/5cac11d5e51d456e55623aca

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值