]> Zhao Yanbai Git Server - acecode.git/commitdiff
...
authoracevest <zhaoyanbai@126.com>
Sun, 4 Jan 2015 09:41:31 +0000 (17:41 +0800)
committeracevest <zhaoyanbai@126.com>
Sun, 4 Jan 2015 09:41:31 +0000 (17:41 +0800)
learn/doc/vimrc
learn/go/README [new file with mode: 0644]
learn/go/hello/hello.go

index 71a033a8842cc0ff0dfa0962b098651411e43bee..4661c7ddb4633cbe467d4fe764f43e1c054d0367 100644 (file)
@@ -76,3 +76,17 @@ hi CursorLine ctermbg=lightcyan cterm=BOLD
 "set cursorcolumn
 "hi CursorColumn ctermbg=lightgreen cterm=BOLD
 set viminfo='1000,<500
+
+" 需要安装bundle/vundle vim-go 到~/.vim/
+"filetype off
+"set rtp+=~/.vim/bundle/vundle/
+"call vundle#rc()
+"Bundle 'gmarik/vundle'
+"Plugin 'fatih/vim-go'
+"filetype plugin indent on
+
+" 以下是让mac vim支持中文输入
+set encoding=utf-8  " 默认UTF-8
+set fenc=utf-8      " 默认以UTF-8新建文件
+set fileencodings=utf-8,cp936   " 打开文件编码按顺序匹配
+set nobomb          " 
diff --git a/learn/go/README b/learn/go/README
new file mode 100644 (file)
index 0000000..e5856ad
--- /dev/null
@@ -0,0 +1 @@
+ln -s ./ /Users/Ace/go/src/learn
index a36de8e3cbd5876d335508997383697325d4662d..49c33d0969542247d1edcfc13e092ae10987a87c 100644 (file)
@@ -1,7 +1,12 @@
 package main
 
 import "fmt"
+import "math/rand"
+import "time"
 
 func main() {
-       fmt.Printf("hello world\n")
+       rand.Seed(time.Now().UnixNano())
+       for i := 0; i < rand.Intn(10); i++ {
+               fmt.Printf("Hello World\n")
+       }
 }