1. 安装mercurial

Mercurial 是一种轻量级分布式版本号控制系统,採用 Python 语言实现

能够输入hg命令查询系统是否安装mercurial,能够例如以下两种命令安装

$sudo pip install mercurial


成功安装之后

$sudo easy-install mercurial


安装之后。输入hg命令。例如以下内容显示,表示安装成功 mercuria

$ hg

Mercurial Distributed SCM

basic commands:

add           add the specified files on the next commit

annotate      show changeset information by line for each file

clone         make a copy of an existing repository

commit        commit the specified files or all outstanding changes

diff          diff repository (or selected files)

export        dump the header and diffs for one or more changesets

forget        forget the specified files on the next commit

init          create a new repository in the given directory

log           show revision history of entire repository or files

merge         merge working directory with another revision

pull          pull changes from the specified source

push          push changes to the specified destination

remove        remove the specified files on the next commit

serve         start stand-alone webserver

status        show changed files in the working directory

summary       summarize working directory state

update        update working directory (or switch revisions)

use "hg help" for the full list of commands or "hg -v" for details

如上命令安装失败。能够直接去下载安装

2. 获取go源码

$hg clone -r release https://go.googlecode.com/hg/ go

warning: go.googlecode.com certificate with fingerprint 3f:8a:ae:12:fc:c2:65:d0:64:42:ee:6f:cc:b3:41:a1:9a:76:6e:8c not verified (check hostfingerprints or web.cacerts config setting)

adding changesets

adding manifests

adding file changes

added 19559 changesets with 68116 changes to 8835 files

updating to branch release-branch.go1.3

4167 files updated, 0 files merged, 0 files removed, 0 files unresolved

会在当前路径创建go文件夹

3.安装go

进入 go源代码(go/src)文件夹进行安装,运行例如以下命令

$ ./all.bash

最后会显示出例如以下内容

ALL TESTS PASSED

---

Installed Go for darwin/amd64 in /Users/angel/iProject/go

Installed commands in /Users/angel/iProject/go/bin

*** You need to add /Users/angel/iProject/go/bin to your PATH.

4.编写HelloWorld

$ cat helloworld.go

package main

import (

"fmt"

)

func main(){

fmt.Println("Hello World")

}

5.执行程序

$ go run helloworld.go

Hello World


參考 链接

版权声明:本文博客原创文章。博客,未经同意,不得转载。

Mac周边环境 goBASIC语言HelloWorld的更多相关文章

  1. iOS开发环境C语言基础

    1 在“桌面”上创建一个文件夹Test 1.1 问题 在桌面上创建一个文件夹,我们需要了解Max OS X操作系统的操作方法.对于Max OS X操作系统,有两种方法可以在桌面上创建文件夹,一种方法是 ...

  2. Scala深入浅出实战经典---001-Scala开发环境搭建和HelloWorld解析

    001-Scala开发环境搭建和HelloWorld解析 Scala 函数式编程和面向对象结合的语言 函数式编程擅长数值计算 面向对象擅长大型工程和项目的组织以及团队的分工协作 Scala会是下一个伟 ...

  3. 桂电在linux、Mac OS环境下使用出校器(支持2.14)

    这是guetsec学长在三院科协学长所抓包逆向分析1.81版出校器的基础上,用python写的一款为Mac和linux环境开发的出校器. 最后我做了略微修改,支持暂时最新版本2.14.下面有直接从源码 ...

  4. php大力力 [002节]mac php环境安装,mamp安装 ,phpMyAdmin启动

    php大力力 [002节]mac php环境安装,mamp安装 ,phpMyAdmin启动 每个人机器不一样,我手头是个air book,查了一下现在最好在mac下,用mamp, mamp百科介绍 , ...

  5. Android开发-环境搭建以及HelloWorld

    最近开始进行Android的开发,没有基础完全从0开始.   首先,知道Android开发的官方网站: http://developer.android.com/index.html 网站本身教程非常 ...

  6. Mac OS环境下媒体文件分割工具mediafilesegmenter的简单使用(生成M3U8 TS文件)

    mediafilesegmenter是苹果开发的一款用于分割媒体文件的工具,其功能与mediastreamsegmenter相似,但操作更简单. * 具体可以对比博客中的另一篇简介<Mac OS ...

  7. MAC开发环境安装

    MAC开发环境安装 安装sancha cmd: 安装: https://www.sencha.com/products/extjs/cmd-download/ cmd运行 $ open .bash_p ...

  8. 在Mac OS环境下安装MySQL服务

    在Mac OS环境下安装MySQL服务 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 我之前介绍过window环境下安装mysql服务,以及在Linux环境下安装mysql服务,今 ...

  9. 【Android开发】之Android环境搭建及HelloWorld

    原文链接:http://android.eoe.cn/topic/android_sdk Android开发之旅:环境搭建及HelloWorld Android开发之旅:环境搭建及HelloWorld ...

随机推荐

  1. java它们的定义ArrayList序列, 大神跳跃

    一个list有两种类型的对象,今天有需求必须责令不同的约会对象,这里是代码 /** *@author xh1991101@163.com */ List<Message> messages ...

  2. registerWithTouchDispatcher()函数的使用

    registerWithTouchDispatcher()函数的使用 registerWithTouchDispatcher()函数主要用于注册Touch事件. 当我们使用this->setTo ...

  3. cocos2d-x坐标系

    在cocos2d-x在,有几种不同的坐标系. 因为有好几个坐标系着一定的差异,他们需要明白,能力更精确的绘制各种图形画面上. 1.屏幕坐标系 只windows通过绘制图形上基本都知道.相应的坐标系统: ...

  4. slider使用TickPlacement获得游标效果

    <Slider Name="slider游标效果" Maximum="3" SmallChange="0.25" TickPlacem ...

  5. hdu 2391 Filthy Rich

    单纯dp 水一 处理时间点,第一行和第一列特殊处理: 其余的w[i][j]=show(w[i-1][j-1],w[i-1][j],w[i][j-1]); <span style="fo ...

  6. Google Maps Android API v2 (4)- 地图类型

    地图类型 地图内的谷歌地图的Android API的种类有很多.地图的类型管辖地图的整体代表性.例如,地图集通常包含政治地图,专注于显示边界和道路地图,显示了一个城市或地区的所有道路. Android ...

  7. 用golang写的 分解x86 intel boot/recovery工具

    源代码地址: https://github.com/sndnvaps/pack-unpack-intel

  8. Javascript中的__proto__、prototype、constructor

    今天重温了下Javacript,给大家带来一篇Javascript博文,相信对于Javacript有一定了解的人都听过prototype原型这个概念,今天我们深度的分析下prototype与__pro ...

  9. 非常不错 Hadoop 的HDFS (Hadoop集群(第8期)_HDFS初探之旅)

    1.HDFS简介 HDFS(Hadoop Distributed File System)是Hadoop项目的核心子项目,是分布式计算中数据存储管理的基础,是基于流数据模式访问和处理超大文件的需求而开 ...

  10. 我理解设计模式C++实现观察者模式Observer Pattern

    概述: 近期中国股市起起伏伏,当然了起伏就用商机,小明发现商机后果断想入市,买入了中国证券,他想在电脑client上,网页上,手机上,iPad上都能够查看到该证券的实时行情,这样的情况下我们应该怎么设 ...