go-examples

module
v0.0.0-...-389a69d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2017 License: Apache-2.0

README

Go examples

Build Status Go Report Card

Various go examples based on gobyexample with extensions.

  • Go basic
  • gRPC
  • Hyper
  • Libvirt client
  • Kubernetes
  • Networking
  • OpenStack client
  • And so on

Golang install

curl -sL https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz | tar -C /usr/local -zxf -
export GOPATH='/go'
export PATH=$GOPATH/bin:/usr/local/go/bin/:$PATH

Useful tools

  • godep: go get github.com/tools/godep
  • dep: go get -u github.com/golang/dep/...
  • govendor: go get -u github.com/kardianos/govendor
  • gometalinter: go get -u github.com/alecthomas/gometalinter && gometalinter --install
  • go-pry: An interactive REPL for Go, go get github.com/d4l3k/go-pry.
  • gophernotes: Go in Notebooks.
    • go get golang.org/x/tools/cmd/goimports
    • go get -tags zmq_4_x github.com/gopherds/gophernotes
    • mkdir -p ~/Library/Jupyter/kernels/gophernotes
    • cp -r $GOPATH/src/github.com/gopherds/gophernotes/kernel/* ~/Library/Jupyter/kernels/gophernotes

Directories

Path Synopsis
basics
arrays command
atomic-counters command
base64-encoding command
c-go command
canonical-hosts command
channels command
closures command
cmd command
constants command
defer command
echo_srv_unix command
epoch command
errors command
exit command
for command
`for` is Go's only looping construct.
`for` is Go's only looping construct.
functions command
generate command
goroutines command
hello-web command
hello-world command
Our first program will print the classic "hello world" message.
Our first program will print the classic "hello world" message.
http-client command
if-else command
interfaces command
json command
json2map command
jsontest command
line-filters command
Here's an example line filter in Go that writes a capitalized version of all input text.
Here's an example line filter in Go that writes a capitalized version of all input text.
log-server command
maps command
measure command
methods command
middleware command
mutexes command
number-parsing command
panic command
pointers command
random-numbers command
range command
rate-limiting command
reading-files command
recursion command
reflection command
* Reflect deep structures of api.PodSpec and export them as grpc proto * * export GOPATH=~/go/src/k8s.io/kubernetes/Godeps/_workspace/:$GOPATH * go run reflection.go *
* Reflect deep structures of api.PodSpec and export them as grpc proto * * export GOPATH=~/go/src/k8s.io/kubernetes/Godeps/_workspace/:$GOPATH * go run reflection.go *
request-logging command
request-routing command
responses command
rpc command
select command
select-ticker command
server command
sha1-hashes command
signals command
slices command
sorting command
static-content command
structs command
switch command
test command
tickers command
time command
timeouts command
timers command
tls command
url-parsing command
values command
variables command
worker-pools command
writing-files command
xml-parse command
Reference http://www.grpc.io/docs/tutorials/basic/go.html Package main is a generated protocol buffer package.
Reference http://www.grpc.io/docs/tutorials/basic/go.html Package main is a generated protocol buffer package.
hyper
attach command
hypercli command
hyperclient command
rpc command
sign command
kubernetes
frakti command
gendocs command
h8s-network command
http command
k8s-client command
pod-create command
Dependency: golang.org/x/crypto/acme/autocert
Dependency: golang.org/x/crypto/acme/autocert
libvirt
libvirt-secret command
libvirt-stats command
misc
postgres command
redis command
networking
cnitool command
getip command
google_search command
list_addr command
namespace command
You should run this binary with suid set.
You should run this binary with suid set.
net_statistics command
reverse_proxy command
openstack
cinder command
cinder-detach command
create-volume command
floatingip command
net-list command
port-create command
port-list command
port-status command
portbinding command
securitygroup command
tenant-list command
Query a regular user's tenant list
Query a regular user's tenant list
token command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL