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. Windows Phone开发(39):漫谈关键帧动画上篇

    原文:Windows Phone开发(39):漫谈关键帧动画上篇 尽管前面介绍的几种动画会让觉得很好玩了,但是,不知道你是否发现,在前面说到的一系列XXXAnimation中,都有一个共同点,那就是仅 ...

  2. java平台的常用资源

    分离领域 翻译 from :akullpp | awesome-java 大家一起学习,共同进步. 如果大家觉得有用,就mark一下,赞一下,或评论一下,让更多的人知道.thanks. 构建 这里搜集 ...

  3. ECLIPSE中反编译插件JAD的配置安装,轻松查看JAVA源代码

    第一步:下载jad的eclipse插件jar包 http://jadclipse.sourceforge.net/wiki/index.php/Main_Page#Download 第二步:将此jar ...

  4. 【NO.3】 c program to caculate and display sum of two matrix

    source code: #include "stdafx.h" /* display sum of two matrix*/ int _tmain(int argc, _TCHA ...

  5. Android自己定义组件系列【5】——高级实践(1)

    在接下来的几篇文章将任老师的博文<您可以下拉PinnedHeaderExpandableListView实现>骤来具体实现.来学习一下大神的代码并记录一下. 原文出处:http://blo ...

  6. Mongodb入门——安装与配置

    作者:zhanhailiang 日期:2014-11-07 1. 安装mongodb: [root@~/wade/nodejs/nodeclub]# yum search mongodb [root@ ...

  7. MySQL 最经常使用的一千行

    /* 启动MySQL */ net start mysql /* 连接和断开server */ mysql -h 住址 -P port -u username -p password /* 跳过许可认 ...

  8. 《反project核心原则》说明

      致亲爱的中国读者: 大家好 !我是<逆向project核心原理> 作者 李承远(ReverseCore). (韩文博客地址:www.reversecore.com) 首先.非常高兴我的 ...

  9. swing中几种layout示例(转)

    import java.awt.BorderLayout;import java.awt.FlowLayout;import java.awt.GridLayout;import java.awt.e ...

  10. Spring HTTPInvoker原理猜想(HTTP+序列化)

    没有查看源码,仅作参考 实现步骤: 一,客户端 (1),远程调用信息封装为远程调用对象 (2),序列化写入到远程调用HTTP请求中 (3),向服务器发送 (4),服务器端返回的HTTP响应结果 (5) ...