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 ...
随机推荐
- 从零开始学Xamarin.Forms(三) Android 制作启动画面
原文:从零开始学Xamarin.Forms(三) Android 制作启动画面 Xamarin.Forms 在启动的时候相当慢,必须添加一个启动界面,步骤如下: 1.将启动画面的图片命名为:s ...
- 关于QTP
关于QTP,我也才接触,只是上来记录一下安装过程,免得以后忘记,又要查一堆资料. 简单介绍一下QTP: QTP的基本功能包括2个部分:一部分是提供给初级用户使用的关键字视图:另一部分是提供给熟悉VBS ...
- Ansj配置指南!
=.= 折腾死 ①你想要http://maven.ansj.org/org/ansj/ansj_seg/找一个尽可能高的版本号,比方2.0.7,点进去之后找到相应的jar,比方ansj_seg-2.0 ...
- Leetcode 3Sum Closet
二手和3Sum像几乎相同的想法.二进制搜索.关键修剪.但是,在修剪做出很多错误. 然后还有一个更加速了原来的想法O(n^2). #include<iostream> #include &l ...
- Fitnesse用系列三
动态决策表 动态决策表是新出,版本号到今年年初还没有了.我看了看文档和演示文稿样本,其效果是作为一种辅助通用决策表.它不是easy匹配的名称和发射.但假设只有一个或两个参数.不管名字怎么都找不到,这并 ...
- git 仓库
从 Git 删除文件 rm test.txt git rm test.txt 加入远程仓库 $ git remote origin $ git remote add pb git://github.c ...
- ECLIPSE中反编译插件JAD的配置安装,轻松查看JAVA源代码
第一步:下载jad的eclipse插件jar包 http://jadclipse.sourceforge.net/wiki/index.php/Main_Page#Download 第二步:将此jar ...
- Case when 的使用方法
SQL Case when 的使用方法 Case具有两种格式.简单Case函数和Case搜索函数. --简单Case函数 CASE sex WHEN '1' THEN '男' WHEN '2' THE ...
- Android项目包装apk和apk反编译,xml反编译
一.项目和一般原则其不足之处包 (1)开发一个简单的项目.当发布了APK档.假设我们不使用签名的方式,直接地bin文件夹中找到*.apk档.非常方便,但是,当我们在使用的用户,可能有其他方案覆盖安装. ...
- 用golang写的生成文件md5sum,检验文件md5sum
源代码地址: https://github.com/sndnvaps/md5sum-golang