启动新会话:
tmux [new -s 会话名 -n 窗口名]
恢复会话:
tmux at [-t 会话名]
| package main | |
| import ( | |
| "fmt" | |
| "reflect" | |
| ) | |
| func switchFunc(c interface{}) { | |
| v := reflect.ValueOf(c) | |
| switch v.Kind() { |
| (defn recursive-sum [numbers] | |
| (if (empty? numbers) | |
| 0 | |
| (+ (first numbers) (recursive-sum (rest numbers))))) | |
| (defn reduce-sum [numbers] | |
| (reduce (fn [acc x] (+ acc x)) 0 numbers)) | |
| (defn sum [numbers] | |
| (reduce + numbers)) |
| func readLine(path string) { | |
| inFile, _ := os.Open(path) | |
| defer inFile.Close() | |
| scanner := bufio.NewScanner(inFile) | |
| scanner.Split(bufio.ScanLines) | |
| for scanner.Scan() { | |
| fmt.Println(scanner.Text()) | |
| } | |
| } |
| package main | |
| import ( | |
| "fmt" | |
| "labix.org/v2/mgo" | |
| "labix.org/v2/mgo/bson" | |
| "time" | |
| ) | |
| type Person struct { |
| This is my first gist. |