GoLang及Sublime Text 2之Mac OS X 10.8.4开发环境安装

本文详细介绍了如何在Mac OS X 10.8.4上安装Go语言和配置Sublime Text 2编辑器环境,包括安装Go的步骤、添加环境变量、测试运行、安装gosublime插件以及Sublime Text 2的个性化配置,如快捷键、多选编辑、无干扰模式等。

2013-09-21 wcdj


1 golang简介

Go is an open source programming environment that makes it easy to build simple, reliable, and efficient software.

golang的主页:http://golang.org/


2 Mac OS X 10.8.4环境安装

(1) 下载安装包(详细可参考:http://golang.org/doc/install

http://code.google.com/p/go/downloads/list 链接中选择安装包: go1.2rc1.darwin-amd64-osx10.8.pkg

https://code.google.com/p/go/wiki/Downloads?tm=2 下载页面

(2) 安装

打开下载好的pkg文件,根据安装向导完成安装。默认的安装路径是:/usr/local/go。

mba:go gerryyang$ pwd
/usr/local/go
mba:go gerryyang$ ls
AUTHORS		PATENTS		api		doc		lib		robots.txt
CONTRIBUTORS	README		bin		favicon.ico	misc		src
LICENSE		VERSION		blog		include		pkg		test
(3) 设置环境变量

将/usr/local/go/bin添加到PATH环境变量中:

a. 在home目录下打开.bashrc文件,并将添加:export PATH=$PATH:/usr/local/go/bin,然后保存关闭;

b. 执行 . .bashrc 使环境变量生效;

在command line测试会显示如下内容:

mba:~ gerryyang$ go
Go is a tool for managing Go source code.

Usage:

	go command [arguments]

The commands are:

    build       compile packages and dependencies
    clean       remove object files
    env         print Go environment information
    fix         run go tool fix on packages
    fmt         run gofmt on package sources
    get         download and install packages and dependencies
    install     compile and install packages and dependencies
    list        list packages
    run         compile and run Go program
    test        test packages
    tool        run specified go tool
    version     print Go version
    vet         run go tool vet on packages

Use "go help [command]" for more information about a command.

Additional help topics:

    c           calling between Go and C/C++
    gopath      GOPATH environment variable
    packages    description of package lists
    remote      remote import path syntax
    testflag    description of testing flags
    testfunc    description of testing functions

Use "go help [topic]" for more information about that topic.

mba:~ gerryyang$ 

3 测试

下面使用MacVim编辑:

package main

针对 Mac OS 上名为 Ollama 的软件或应用程序的信息,在现有资料中并未找到直接提及该名称的具体描述。这可能是因为 Ollama 并不是一个广泛认知的应用程序或是其知名度较低[^1]。 然而,对于探索任何新的 macOS 应用程序的一般方法如下: ### 探索新应用程序的方法 #### 通过官方渠道获取信息 - **App Store**: 访问苹果 App Store 可以查找并下载各种应用程序,包括那些特定于 macOS 的工具。 - **开发者网站**: 如果知道某个应用是由哪家公司开发,则可以直接访问该公司官网寻找更多信息。 #### 使用命令行工具收集系统信息 当涉及到像 Ollama 这样的具体应用时,如果已经安装了此应用,可以利用 `IOPlatformExpertDevice` 来枚举硬件特性以及关联的服务状态等系统级详情: ```bash ioreg -l | grep "Ollama" ``` 上述命令可以帮助定位与目标应用有关联的设备节点及其属性。 #### 开发环境配置建议 如果是考虑为 macOS 构建类似 Ollama 的项目,那么设置合适的集成开发环境(IDE)非常重要。例如 Sublime Text 是一个流行的文本编辑器,适合编写多种编程语言代码;而 GoLang 则是一种高效的编译型语言,适用于构建高性能服务端应用。为了在 Mac OS X (版本号如 10.8.4 或更新版)上搭建这两种技术栈的工作区,可以从安装必要的依赖包开始,接着按照教程指南完成 IDE 和 SDK 的部署[^2].
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值