Mac周边环境 goBASIC语言HelloWorld

Mac周边环境 goBASIC语言HelloWorld

大家好,又见面了,我是全栈君,今天给大家准备了Idea注册码。

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


參考 链接

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

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/117316.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • JAVA常见数据结构

    JAVA常见数据结构常见的的数据结构数据存储的常⽤结构有:栈、队列、数组、链表和红⿊树。栈栈:stack,⼜称堆栈,它是运算受限的线性表,其限制是仅允许在标的⼀端进⾏插⼊和删除操作,不允许在其他任何位置进⾏添加、查找、删除等操作。简单的说:采⽤该结构的集合,对元素的存取有如下的特点1.先进后出(即,存进去的元素,要在后它后⾯的元素依次取出后,才能取出该元素)。例如,⼦弹压进弹夹,先压进去的⼦弹在下⾯,后压进去的⼦弹在上⾯,当开枪时,先弹出上⾯的⼦弹,然后才能弹出下⾯的⼦弹。2.栈的⼊⼝、出⼝的都是栈的顶端位置。

    2022年7月7日
    19
  • MPP架构详解_大数据中心架构详解

    MPP架构详解_大数据中心架构详解数据库构架设计中主要有SharedEverthting、SharedNothing、和SharedDisk:SharedEverthting:一般是针对单个主机,完全透明共享CPU/MEMORY/IO,并行处理能力是最差的,典型的代表SQLServerSharedDisk:各个处理单元使用自己的私有CPU和Memory,共享磁盘系统。典型的代表OracleRac,它是数据共…

    2025年5月30日
    3
  • css设置背景图片大小自适应_css设置整个页面背景图片

    css设置背景图片大小自适应_css设置整个页面背景图片background:pink;图片在背景图上面background-image:url(food.jpg);一张图片铺满一行background-repeat:repeat-x;同一张图片多张铺满

    2022年8月5日
    7
  • 使用CEF类库处理HTTP请求「建议收藏」

    使用CEF类库处理HTTP请求

    2022年3月6日
    41
  • kettle工具实现数据清洗「建议收藏」

    kettle工具实现数据清洗「建议收藏」一、Excel输入2.设置参数3.查看被选中的文件名称。单击【显示文件名称…】按钮,弹出【文件读取】对话框,查看被选中读取的文件,如图所示。4.设置工作表5.【字段】选项卡参数6.预览记录二、生成记录1.加入控件3.预览记录三、生成随机数1.加入控件2.配置控件3.预览记录四、获取系统信息1.加入控件2.配置控件3.预览记录五、排序记录1.建…

    2022年10月10日
    1
  • es6数组方法find()、findIndex()与filter()的总结

    es6数组方法find()、findIndex()与filter()的总结find()该方法主要应用于查找第一个符合条件的数组元素。它的参数是一个回调函数。在回调函数中可以写你要查找元素的条件,当条件成立为true时,返回该元素。如果没有符合条件的元素,返回值为undefined。以下代码在myArr数组中查找元素值大于4的元素,找到后立即返回。返回的结果为查找到的元素:constmyArr=[1,2,3,4,5,6];varv=myArr.find(value=>value>4);console.log(v);//5没有符合元素,返回undefi

    2022年5月29日
    79

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号