Go Go

*:first-child {
margin-top: 0 !important;
}

body>*:last-child {
margin-bottom: 0 !important;
}

/* BLOCKS
=============================================================================*/

p, blockquote, ul, ol, dl, table, pre {
margin: 15px 0;
}

/* HEADERS
=============================================================================*/

h1, h2, h3, h4, h5, h6 {
margin: 20px 0 10px;
padding: 0;
font-weight: bold;
-webkit-font-smoothing: antialiased;
}

h1 tt, h1 code, h2 tt, h2 code, h3 tt, h3 code, h4 tt, h4 code, h5 tt, h5 code, h6 tt, h6 code {
font-size: inherit;
}

h1 {
font-size: 28px;
color: #000;
}

h2 {
font-size: 24px;
border-bottom: 1px solid #ccc;
color: #000;
}

h3 {
font-size: 18px;
}

h4 {
font-size: 16px;
}

h5 {
font-size: 14px;
}

h6 {
color: #777;
font-size: 14px;
}

body>h2:first-child, body>h1:first-child, body>h1:first-child+h2, body>h3:first-child, body>h4:first-child, body>h5:first-child, body>h6:first-child {
margin-top: 0;
padding-top: 0;
}

a:first-child h1, a:first-child h2, a:first-child h3, a:first-child h4, a:first-child h5, a:first-child h6 {
margin-top: 0;
padding-top: 0;
}

h1+p, h2+p, h3+p, h4+p, h5+p, h6+p {
margin-top: 10px;
}

/* LINKS
=============================================================================*/

a {
color: #4183C4;
text-decoration: none;
}

a:hover {
text-decoration: underline;
}

/* LISTS
=============================================================================*/

ul, ol {
padding-left: 30px;
}

ul li > :first-child,
ol li > :first-child,
ul li ul:first-of-type,
ol li ol:first-of-type,
ul li ol:first-of-type,
ol li ul:first-of-type {
margin-top: 0px;
}

ul ul, ul ol, ol ol, ol ul {
margin-bottom: 0;
}

dl {
padding: 0;
}

dl dt {
font-size: 14px;
font-weight: bold;
font-style: italic;
padding: 0;
margin: 15px 0 5px;
}

dl dt:first-child {
padding: 0;
}

dl dt>:first-child {
margin-top: 0px;
}

dl dt>:last-child {
margin-bottom: 0px;
}

dl dd {
margin: 0 0 15px;
padding: 0 15px;
}

dl dd>:first-child {
margin-top: 0px;
}

dl dd>:last-child {
margin-bottom: 0px;
}

/* CODE
=============================================================================*/

pre, code, tt {
font-size: 12px;
font-family: Consolas, "Liberation Mono", Courier, monospace;
}

code, tt {
margin: 0 0px;
padding: 0px 0px;
white-space: nowrap;
border: 1px solid #eaeaea;
background-color: #f8f8f8;
border-radius: 3px;
}

pre>code {
margin: 0;
padding: 0;
white-space: pre;
border: none;
background: transparent;
}

pre {
background-color: #f8f8f8;
border: 1px solid #ccc;
font-size: 13px;
line-height: 19px;
overflow: auto;
padding: 6px 10px;
border-radius: 3px;
}

pre code, pre tt {
background-color: transparent;
border: none;
}

kbd {
-moz-border-bottom-colors: none;
-moz-border-left-colors: none;
-moz-border-right-colors: none;
-moz-border-top-colors: none;
background-color: #DDDDDD;
background-image: linear-gradient(#F1F1F1, #DDDDDD);
background-repeat: repeat-x;
border-color: #DDDDDD #CCCCCC #CCCCCC #DDDDDD;
border-image: none;
border-radius: 2px 2px 2px 2px;
border-style: solid;
border-width: 1px;
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
line-height: 10px;
padding: 1px 4px;
}

/* QUOTES
=============================================================================*/

blockquote {
border-left: 4px solid #DDD;
padding: 0 15px;
color: #777;
}

blockquote>:first-child {
margin-top: 0px;
}

blockquote>:last-child {
margin-bottom: 0px;
}

/* HORIZONTAL RULES
=============================================================================*/

hr {
clear: both;
margin: 15px 0;
height: 0px;
overflow: hidden;
border: none;
background: transparent;
border-bottom: 4px solid #ddd;
padding: 0;
}

/* IMAGES
=============================================================================*/

img {
max-width: 100%
}
-->

题记:学习是进步的源泉!

在这个云计算、多核盛行的时代,学习一门与之相配合的语言也就无可厚非了。那么对多核与并行计算原生支持的Go就是我的选择了...

关于GO的好坏,我不会去深究,在每个人眼中,这都是主观的。喜欢就会觉得好,不喜欢好也是坏。当然,它本身的优势与劣势是值得我们关注了,这决定了它的适用性。

工欲善其事必先利其器,本人学习一门语言之前,喜欢先寻找趁手的兵器。搜索之,继而找到了LiteIDE。由于偏爱集成开发环境,那么Sublime也就不是我的首选了。


以上全是废话,下面开始搭建开发环境。

1、准备工作

  1. PC + Windows操作系统(我承认我只会玩Windows...)
  2. 你得下载Go语言:https://golang.org/ BTW:我下载的文件名是:go1.4.1.windows-amd64.msi
  3. LiteIDE:https://github.com/visualfc/liteide

2、搭建环境

首先,你需要安装Go语言。什么?你不会?双击msi(或者exe),Next到手软就可以了。当然,最后应该是Finish。经过这个步骤,go就安装上了,什么环境变量啥的都给你配置好了。当然,安装成功不成功不是你说了算,那么打开cmd,输入一个go试试?如果报错,那么狠抱歉,请重试该步骤,或者检查环境变量。如果提示Go is a tool for managing Go source code ,那么恭喜你,安装已成功!

接下面,安装LiteIDE,这货的下载地址在http://sourceforge.net/projects/liteide/files,如果你爱折腾,那么直接下载源码编译也是OK的,请参考https://github.com/visualfc/liteide/blob/master/liteidex/deploy/welcome/en/install.md。此处熊出没!liteide下载下来可不是exe或者msi文件哦。我下载的文件名是:liteidex27-1.windows.7z。既然这样,那么解压缩,找个地儿一扔就搞定,是不是更简单?

3、永远的经典:Hello World

既然到了这里,想必以上两个小玩意已经安装好了。那么就应该开始写代码。据说程序员爱代码不爱妹子,这是真的么?

找到liteIDE的安装目录,进行/bin目录,双击“liteide.exe”(PS:一看到这个丑丑的太极图标,我就在想,这货应该是一个国人开发的吧,呵呵,果真是!)。和一般IDE无异,File->New->Go1 Command Project(Not Use GOPATH),当然其他也是可以选的,惊喜在等着你。输入必要的信息,那么一个项目就创建好了。

打开main.go文件,输入代码(这段代码我是借鉴的,肯定不是copy的):

// demo1 project main.go
package main import (
"fmt"
) func main() {
fmt.Println("Hello World!")
}

然后点击工具栏上的FR(File Run),这坑爹的按钮,简直反人类。。我点了N次Go按钮之后,才发现这货才是运行。。在右下方区域就能看到输出了。。Hello World~

后记:至此,一个简单的Go开发环境已经搭建好了。

或许你还有疑问

  1. 如果生成可执行文件呢? 可以利用LiteIDE的Build按钮,或者是控制台命令 go build
  2. 如果我是64位系统,如何生成32位可执行程序呢? 我也不知道,只能给你关键字“交叉编译”
  3. 更多,就留给你慢慢发掘吧。Over!

随机推荐

  1. Python类

    在类的变量前面加 _ _ 是私有变量,外部不可访问. 需要注意的是,在Python中,变量名类似__xxx__的,也就是以双下划线开头,并且以双下划线结尾的,是特殊变量,特殊变量是可以直接访问的,不是 ...

  2. 基于Chromium构建Chrome WebBrowser for .net 控件(还有点心得体会)

    http://blog.csdn.net/lllllllllluoyi/article/details/8540054 首先向360说句sorry,在2011年360极速浏览器出现的时候我去他们论坛里 ...

  3. 虚拟机评估——如何确定一个CPU核上部署的虚拟机数量?

    最近研究虚拟化技术,不可避免遇到一个问题:如何评估物理主机上虚拟主机的容量?下面这篇文章的思路有一定的启发性,转发一下. 如何确定一个CPU核上部署的虚拟机数量? 摘要:本文说明一个CPU核上部署虚拟 ...

  4. protocol buffer

    下载与说明:https://github.com/google/protobuf Google Protocol Buffer 的使用和原理:http://www.ibm.com/developerw ...

  5. nginx 重写 rewrite 基础及实例

    nginx rewrite 正则表达式匹配 大小写匹配 ~ 为区分大小写匹配 ~* 为不区分大小写匹配 !~和!~*分别为区分大小写不匹配及不区分大小写不匹配 文件及目录匹配 -f和!-f用来判断是否 ...

  6. [SRS流媒体]RTMP/HLS 直播服务器simple-rtmp-server安装

    一个采用MIT协议授权的国产的简单的RTMP/HLS 直播服务器,其核心的价值理念在于简单高效. 使用方法: tep 1: build srs tar xf simple-rtmp-server-*. ...

  7. Jquery Data Table插件

    <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding= ...

  8. 关于SQLServer2008数据如何导入SQL2005的解决办法,高版本数据导入低版本中。

    最近需要把SqlServer2008 的数据库导入sqlserver2005 中.直接备份还原肯定不行.后来想到可以生成脚本执行sql语句,并选择数据可以一同进行执行. 点击右键--->任务-- ...

  9. 关于MYSQL中like 检索汉字问题。

    mysql中like’中国‘查询不出来结果 如果 like‘zg’就看查询出来结果. 查询了半天是由于mysql中编码的原因 解决办法: 进入mysql 输入命令:show variables lik ...

  10. 1.C#中通过委托Action消除重复代码

    阅读目录 一:重复的代码  二:使用委托消除重复代码     一:重复的代码    我们在写一些方法的时候,会在里面可能出现异常的地方使用try catch语句,这样每个方法都会有try catch语 ...