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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • Linux 解压 zip 分卷

    Linux 解压 zip 分卷对于一个大的文件,使用分卷压缩得到如下文件:传到Linux目录下,希望解压出来,需要使用zip-F命令修复分卷,从而合成正确的一个压缩文件zip-FUCF-101.zip–outucf101.zip得到ucf101.zip,然后解压ucf101.zip即可unzipucf101.zip…

    2022年5月23日
    193
  • 几个数字的组合方式种类个数

    几个数字的组合方式种类个数几个数字的组合方式种类个数

    2022年4月24日
    48
  • C++_vector操作

    C++_vector操作vector说明:vector是向量类型,可以容纳许多类型的数据,因此也被称为容器(可以理解为动态数组,是封装好了的类)vector头文件-vectorvector初始化:方式1.vector<int>a(10);//定义具有10个整型元素的向量(尖括号为元素类型名,它可以是任何合法的数据类型),不具有初值,其值不确定方式2.vector<int>a…

    2022年6月30日
    22
  • Allure报告开发自定义插件

    Allure报告开发自定义插件allure官网文档 https://docs.qameta.io/allure/alluregithub https://github.com/allure-framework/allure2当报告无法满足当前项目的需求,需要自定义内容来展示在报告中,即需要开发自己的自定义插件最终结果图:demo的结果是新增了一个MyTab目录栏,(demo未做有意义数据和css样式)…

    2022年7月26日
    19
  • 怎样提高团队管理能力10「建议收藏」

    怎样提高团队管理能力10

    2022年2月6日
    42
  • oracle number类型的数值存储空间是几个字节?

    oracle number类型的数值存储空间是几个字节?其实有公式可以计算:number(p,s)占用得空间为:length=floor((p+1)/2)+1备注:如果该数值为负数,需要再加一个字节。—————-例如:NUMBER(14,4)的类型数值,存储空间为selectfloor((14+1)/2)+1fromdual结果输出为:8

    2022年7月24日
    5

发表回复

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

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