Mac周边环境 goBASIC语言HelloWorld
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的更多相关文章
- iOS开发环境C语言基础
1 在“桌面”上创建一个文件夹Test 1.1 问题 在桌面上创建一个文件夹,我们需要了解Max OS X操作系统的操作方法.对于Max OS X操作系统,有两种方法可以在桌面上创建文件夹,一种方法是 ...
- Scala深入浅出实战经典---001-Scala开发环境搭建和HelloWorld解析
001-Scala开发环境搭建和HelloWorld解析 Scala 函数式编程和面向对象结合的语言 函数式编程擅长数值计算 面向对象擅长大型工程和项目的组织以及团队的分工协作 Scala会是下一个伟 ...
- 桂电在linux、Mac OS环境下使用出校器(支持2.14)
这是guetsec学长在三院科协学长所抓包逆向分析1.81版出校器的基础上,用python写的一款为Mac和linux环境开发的出校器. 最后我做了略微修改,支持暂时最新版本2.14.下面有直接从源码 ...
- php大力力 [002节]mac php环境安装,mamp安装 ,phpMyAdmin启动
php大力力 [002节]mac php环境安装,mamp安装 ,phpMyAdmin启动 每个人机器不一样,我手头是个air book,查了一下现在最好在mac下,用mamp, mamp百科介绍 , ...
- Android开发-环境搭建以及HelloWorld
最近开始进行Android的开发,没有基础完全从0开始. 首先,知道Android开发的官方网站: http://developer.android.com/index.html 网站本身教程非常 ...
- Mac OS环境下媒体文件分割工具mediafilesegmenter的简单使用(生成M3U8 TS文件)
mediafilesegmenter是苹果开发的一款用于分割媒体文件的工具,其功能与mediastreamsegmenter相似,但操作更简单. * 具体可以对比博客中的另一篇简介<Mac OS ...
- MAC开发环境安装
MAC开发环境安装 安装sancha cmd: 安装: https://www.sencha.com/products/extjs/cmd-download/ cmd运行 $ open .bash_p ...
- 在Mac OS环境下安装MySQL服务
在Mac OS环境下安装MySQL服务 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 我之前介绍过window环境下安装mysql服务,以及在Linux环境下安装mysql服务,今 ...
- 【Android开发】之Android环境搭建及HelloWorld
原文链接:http://android.eoe.cn/topic/android_sdk Android开发之旅:环境搭建及HelloWorld Android开发之旅:环境搭建及HelloWorld ...
随机推荐
- Coder的利器
Coder的利器记载 工作近三年,使用PC快六年,拥抱Mac整一年,投具器石榴裙三年.14年第一次被同事推荐Everything,开启了JeffJade对工具的折腾之旅,并乐此不疲.时去两年,这必然是 ...
- sgu 286. Ancient decoration(最小环覆盖)
给你一个n个点,每个点度为k(k为偶数)的无向图,问是否能将图中的n条边染色,使得每个点都拥有两条被染色的边.也就是说,是否存在拥有原图中n条边的子图,使得每个点的度为2?仔细想想,每个点的度为2,实 ...
- Linux命令之文本处理(二)
cut命令 cut命令用来操作文件的列,能够视为列编辑器:与之相应是大多数的行"编辑器".如sed.grep.sort等,它们操作文本时,以行为单位. cut的主要功能就是输出文本 ...
- uva 571 素数的性质
给定 两个杯子,容量分别分Ca,Cb, 要我们用这两个瓶子倒来倒去,得到某个瓶子里装有N的水 而且给的数据保证 Cb > N,且Ca,Cb互质 那么我们肯定可以在容量为Cb的杯子里得到N的水 ...
- add-apt-repository
也许你早已注意到,我们在介绍软件的时候,在安装这块一般都提供 PPA 源安装方式,这是一种快速方便的软件安装方法,但对于一些新手来说,对 PPA 并不是很熟悉,下面我们就详细介绍一下. # 我们先了解 ...
- Java 序列化Serializable详解(附详细例子)
Java 序列化Serializable详解(附详细例子) 1.什么是序列化和反序列化 Serialization(序列化)是一种将对象以一连串的字节描述的过程:反序列化deserialization ...
- 【shell文字】mysql每日备份shell文字
每天固定时间使用mysqldump 备份mysql数据. #!/bin/bash #每天早上4点, mysql备份数据 orangleliu #chmod 700 backup.sh #crontab ...
- uva live 6190 Beautiful Spacing (二分法+dp试 基于优化的独特性质)
I - Beautiful Spacing Time Limit:8000MS Memory Limit:65536KB 64bit IO Format:%lld & %llu ...
- 《SAS编程和数据挖掘商业案例》学习笔记# 19
继续<SAS编程与数据挖掘商业案例>学习笔记,本文側重数据处理实践.包含:HASH对象.自己定义format.以及功能强大的正則表達式 一:HASH对象 Hash对象又称散列表,是依据关键 ...
- POJ 2352 Stars 树阵
标题效果:特定y值在升序一些点.一个点的定义level值点的数目对于其左下,每个请求level多少分. 思维:因为y值它是按升序.所以分的差距仅仅是推断x值相比之前的大.就用树状数组维护. CODE: ...