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 ...
随机推荐
- HTML 5最终确定,八年后,我们再谈谈如何改变世界
从原:http://www.36kr.com/p/216655.html 我们第一次谈论HTML5要改变世界大概是由于乔布斯,他坚持在iOS上不兼容Flash,在Adobe统治多媒体开发的那个年代.这 ...
- NET Core控制反转(IoC)
ASP.NET Core中的依赖注入(1):控制反转(IoC) ASP.NET Core在启动以及后续针对每个请求的处理过程中的各个环节都需要相应的组件提供相应的服务,为了方便对这些组件进行定制, ...
- 悟道—位IT高管20年的职场心经(读书笔记五)
悟道--一位IT高管20年的职场心经 第五章 搞定老板 "老板就是老板" 这一点,你可能会忘了,他一定不会忘: "老板不会总是老板" 这一点,他可能会忘,你最好 ...
- CSS检测的高像素密度屏幕设备
iPhone4尽管是640px解析度,但它的屏幕宽度(device-width)目前只有320px和iPhone3G相同.只是iPhone4S的像素密度2. 然后使用meta viewport什么时候 ...
- QQ旅程server分析01-网关server
网关server网络进程: s1.连接网关管理器 s2.上报自身信息给网关管理器 s3.从网关管理器获取自己的管理信息 *s4.依照管理信息预分配好须要的资源 s5.网关server打开client监 ...
- 【牛腩新闻公布系统】WebForms UnobtrusiveValidationMode 须要“jquery”ScriptResourceMapping。
问题: WebForms UnobtrusiveValidationMode须要"jquery"ScriptResourceMapping. 请加入一个名jquery ...
- 一个简单的java僵局演示示例
在实际编程,为了避免死锁情况,但是,让你写一个有用的程序死锁似几乎不要太简单(种面试题),下面是一个简单的死锁样例. 线程的同步化可能会造成死锁,死锁发生在两个线程相互持有对方正在等待的东西(实际是两 ...
- 快速排序java
快速排序(Quicksort)是对冒泡排序的一种改进.它是先在数组中找到一个关键数,第一趟排序将比关键数小的放在它的左边,比关键数大的放在它的右边.当第一趟排序结束后,再依次递归将左边和右边的进行排序 ...
- Enum变量值的Discretion
有些时候,某个方法的返回值是个枚举类型,比如描述登录结果: public enum LoginResult { Success, WrongPassword, } 当前段UI获取到登陆方法的返回结果时 ...
- 采用ACE登录设施(一)HelloWorld
(1)开始使用日志设施 使用日志设施,总是要包括头文件: #include "ace/Log_Msg.h" ACE日志的Hello World #ifdef _DEBUG #pra ...