See also, http://libraryofalexandria.io/cgo/
cgo has a lot of trap.
but Not "C" pkg also directory in $GOROOT/src. IDE's(vim) Goto command not works.
So, Here collect materials.
| # Change these variables as necessary. | |
| main_package_path = ./cmd/example | |
| binary_name = example | |
| # ==================================================================================== # | |
| # HELPERS | |
| # ==================================================================================== # | |
| ## help: print this help message | |
| .PHONY: help | 
| { | |
| "items": [ | |
| { | |
| "simpleResponse": { | |
| "textToSpeech":"This is the first simple response for a basic card" | |
| } | |
| }, | |
| { | |
| "basicCard": { | |
| "title":"Title: this is a title", | 
| Add the `replication` section to the mongod.conf file: | |
| ``` | |
| $cat /usr/local/etc/mongod.conf | |
| systemLog: | |
| destination: file | |
| path: /usr/local/var/log/mongodb/mongo.log | |
| logAppend: true | |
| storage: | |
| engine: mmapv1 | 
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "strconv" | |
| "github.com/miekg/dns" | |
| ) | 
See also, http://libraryofalexandria.io/cgo/
cgo has a lot of trap.
but Not "C" pkg also directory in $GOROOT/src. IDE's(vim) Goto command not works.
So, Here collect materials.
| package main | |
| import ( | |
| "bytes" | |
| "encoding/json" | |
| "fmt" | |
| "strconv" | |
| ) | |
| func main() { | 
| #!/bin/sh | |
| # Mount an NFS share on Android | |
| # Requirements: | |
| # - Busybox | |
| # - A kernel supporting nfs (either built-in or as a module) | |
| # On my Nexus 7 2012 I use the following kernel: | |
| # http://forum.xda-developers.com/showthread.php?t=2107224 | |
| # Remember: if you have problems of system space, simply delete some of the default stuff. | 
| package main | |
| import ( | |
| "compress/gzip" | |
| "io" | |
| "net/http" | |
| "strings" | |
| ) | |
| // Gzip Compression | 
After install run
# start statsd
# start graphite
statsd is on 8125 port
graphite is on http://127.0.0.1:8080/
| NO_COLOR=\033[0m | |
| OK_COLOR=\033[32;01m | |
| ERROR_COLOR=\033[31;01m | |
| WARN_COLOR=\033[33;01m | |
| DEPS = $(go list -f '{{range .TestImports}}{{.}} {{end}}' ./...) | |
| deps: | |
| @echo "$(OK_COLOR)==> Installing dependencies$(NO_COLOR)" | |
| @go get -d -v ./... | |
| @echo $(DEPS) | xargs -n1 go get -d |