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)
上一篇 2022年1月7日 下午7:00
下一篇 2022年1月7日 下午7:00


相关推荐

  • 特斯拉用上了国产大模型,Model Y L将接入豆包和DeepSeek

    特斯拉用上了国产大模型,Model Y L将接入豆包和DeepSeek

    2026年3月12日
    3
  • char转int的方法_char 转 int

    char转int的方法_char 转 int这是我的第一篇博客,也是我学习的一种方法,我会将学习中总结出的方法问题通过博客记录下来,希望能帮到同样在努力学习的朋友,也希望有什么不足得到大家的补充帮助回归正文,在编程中我们常常会涉及到类型转换的问题,类型转换最重视的装箱与拆箱带来的性能损耗。char类型与int类型同属于值类型,因此在char转换成int的时候就想不造成装箱拆箱的性能损耗的同时完成转换就可以这样做,首先大家要明

    2022年10月2日
    3
  • 运维架构

    运维架构运维架构1、运维团队配置运维团队分为:应用运维、系统运维、运维开发、监控运维、DBA团队和安全团队团队分工:应用运维:负责支持线上业务,各自会负责对应的业务线,主要职能是保证线上业务稳定性和同开发共

    2022年7月1日
    25
  • 深入解析OpenClaw:火爆背后的AI智能体架构与技术栈实现

    深入解析OpenClaw:火爆背后的AI智能体架构与技术栈实现

    2026年3月15日
    1
  • Docker针对运行JAVA程序的优化

    Docker针对运行JAVA程序的优化

    2021年5月30日
    119
  • 手把手教你Nginx 配置 HTTPS 完整过程

    手把手教你Nginx 配置 HTTPS 完整过程今天作为程序员专属得节日 1024 程序员节是广大程序员的共同节日 1024 是 2 的十次方 二进制计数的基本计量单位之一 针对程序员经常周末加班与工作日熬夜的情况 部分互联网机构倡议每年的 10 月 24 日为 1024 程序员节 在这一天建议程序员拒绝加班 程序员就像是一个个 1024 以最低调 踏实 核心的功能模块搭建起这个科技世界 1G 1024M 而 1G 与 1 级谐音 也有一级棒的意思 当然在我们日常开发过程中 监控也是必不可少得 所以今天我们就来了解下 zabbix 监控 1 Zabbix 简介 zabbix 是一个基于

    2026年3月16日
    1

发表回复

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

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