Documentation
¶
There is no documentation for this package.
Directories
¶
| Path | Synopsis |
|---|---|
|
architecture
|
|
|
exercises/minio
command
|
|
|
closures
|
|
|
demos/closures
command
|
|
|
concurrency
|
|
|
demos/goroutine
command
|
|
|
demos/waitgroup
command
|
|
|
consensus
|
|
|
demos/raft
command
|
|
|
demos/raft/httpd
Package httpd provides the HTTP server for accessing the distributed key-value store.
|
Package httpd provides the HTTP server for accessing the distributed key-value store. |
|
contexts
|
|
|
demos/contexts/cancellation
command
|
|
|
demos/contexts/deadline
command
|
|
|
demos/contexts/timeouts
command
|
|
|
demos/contexts/values
command
|
|
|
exercises/contextrpc/client
command
|
|
|
exercises/contextrpc/server
command
|
|
|
solutions/contextrpc/client
command
|
|
|
solutions/contextrpc/server
command
|
|
|
dcom
|
|
|
demos/client
command
|
|
|
demos/server
command
|
|
|
exercises/logger/publisher
command
|
|
|
exercises/logger/subscriber
command
|
|
|
exercises/onenode/publisher
command
|
|
|
exercises/onenode/subscriber
command
|
|
|
solutions/logger/subscriber
command
|
|
|
disco
|
|
|
exercises/contextrpc/client
command
|
|
|
exercises/contextrpc/server
command
|
|
|
solutions/contextrpc/client
command
|
|
|
solutions/contextrpc/server
command
|
|
|
embeddingcomposition
|
|
|
demos/behaviors
command
|
|
|
demos/both
command
Sample program demonstrating composition through embedding.
|
Sample program demonstrating composition through embedding. |
|
demos/embedding
command
Sample program to show how to embed a type into another type and the relationship between the inner and outer type.
|
Sample program to show how to embed a type into another type and the relationship between the inner and outer type. |
|
demos/interfaces
command
Sample program to show how embedded types work with interfaces.
|
Sample program to show how embedded types work with interfaces. |
|
exercises/behaviors
command
|
|
|
solutions/behaviors
command
|
|
|
embracestd
|
|
|
demos/pipe
command
|
|
|
exercises/pipe
command
|
|
|
solutions/pipe
command
|
|
|
flowanderrors
|
|
|
demos/defer
command
|
|
|
demos/for
command
|
|
|
demos/if
command
|
|
|
demos/skipelse
command
|
|
|
demos/switch
command
|
|
|
demos/typeswitch
command
|
|
|
funcmethodsinterfaces
|
|
|
demos/assert
command
|
|
|
demos/empty
command
|
|
|
demos/firstmethod
command
Sample program to show how to declare function variables.
|
Sample program to show how to declare function variables. |
|
demos/funcs
command
|
|
|
demos/funcvalues
command
|
|
|
demos/interfaces
command
Declare an interface named speaker with a method named sayHello.
|
Declare an interface named speaker with a method named sayHello. |
|
demos/method
command
Sample program to show how to declare methods and how the Go compiler supports them.
|
Sample program to show how to declare methods and how the Go compiler supports them. |
|
exercises/assert
command
|
|
|
solutions/assert
command
|
|
|
gettingstarted
|
|
|
exercises/hello
command
|
|
|
goteam
|
|
|
solutions/inventory/cmd
command
|
|
|
monmetlog
|
|
|
exercises/raft
command
|
|
|
exercises/raft/httpd
Package httpd provides the HTTP server for accessing the distributed key-value store.
|
Package httpd provides the HTTP server for accessing the distributed key-value store. |
|
solutions/raft
command
|
|
|
solutions/raft/httpd
Package httpd provides the HTTP server for accessing the distributed key-value store.
|
Package httpd provides the HTTP server for accessing the distributed key-value store. |
|
offlineproc
|
|
|
exercises/nsq/client
command
|
|
|
exercises/nsq/producer
command
|
|
|
pointersreftypes
|
|
|
demos/array
command
Sample program to show how to declare and iterate over arrays of different types.
|
Sample program to show how to declare and iterate over arrays of different types. |
|
demos/for
command
Sample program to show how to declare and iterate over arrays of different types.
|
Sample program to show how to declare and iterate over arrays of different types. |
|
demos/maps
command
Sample Map program
|
Sample Map program |
|
demos/mapsinline
command
Sample Map program
|
Sample Map program |
|
demos/passbyref
command
|
|
|
demos/passbyval
command
Sample program to show the basic concept of using a pointer to share data.
|
Sample program to show the basic concept of using a pointer to share data. |
|
demos/range
command
Sample program to show how to declare and iterate over arrays of different types.
|
Sample program to show how to declare and iterate over arrays of different types. |
|
demos/runes
command
Sample program to show how strings have a UTF-8 encoded byte array.
|
Sample program to show how strings have a UTF-8 encoded byte array. |
|
demos/slice
command
Sample program to show how to takes slices of slices to create different views of and make changes to the underlying array.
|
Sample program to show how to takes slices of slices to create different views of and make changes to the underlying array. |
|
demos/sliceinline
command
Declare a nil slice of integers.
|
Declare a nil slice of integers. |
|
exercises/range
command
Sample program to show how to declare and iterate over arrays of different types.
|
Sample program to show how to declare and iterate over arrays of different types. |
|
solutions/range
command
Sample program to show how to declare and iterate over arrays of different types.
|
Sample program to show how to declare and iterate over arrays of different types. |
|
profbench
|
|
|
demos/gogrep
command
|
|
|
demos/gogreptrace
command
|
|
|
exercises/gogrep
command
|
|
|
includes/gogrep
command
|
|
|
resilientapps
|
|
|
exercises/service
command
Adapted from http://www.alexedwards.net/blog/a-recap-of-request-handling
|
Adapted from http://www.alexedwards.net/blog/a-recap-of-request-handling |
|
solutions/service
command
Adapted from http://www.alexedwards.net/blog/a-recap-of-request-handling
|
Adapted from http://www.alexedwards.net/blog/a-recap-of-request-handling |
|
scalablesvcs
|
|
|
demos/contexts/cancellation
command
|
|
|
demos/contexts/deadline
command
|
|
|
demos/contexts/timeouts
command
|
|
|
demos/contexts/values
command
|
|
|
syntaxtypes
|
|
|
demos/constantnumber
command
|
|
|
demos/constantstring
command
|
|
|
demos/explicit
command
|
|
|
demos/implicit
command
|
|
|
demos/iota
command
|
|
|
demos/iotaskip
command
|
|
|
demos/modifyconst
command
|
|
|
demos/sequence
command
|
|
|
demos/structs
command
Sample program to show how to declare and initialize struct types.
|
Sample program to show how to declare and initialize struct types. |
|
demos/withoutinit
command
|
|
|
demos/zero
command
Sample program to show how to declare variables.
|
Sample program to show how to declare variables. |
|
usefulinterfaces
|
|
|
demos/inventory/cmd
command
|
|
|
exercises/inventory/cmd
command
|
|
|
solutions/inventory/cmd
command
|
|
|
web
|
|
|
apis/demos/example1
command
Sample program to show how to create a simple web api with different versions.
|
Sample program to show how to create a simple web api with different versions. |
|
apis/demos/example2
command
Sample program to show how to have a single route for the api but have access to either through configuration.
|
Sample program to show how to have a single route for the api but have access to either through configuration. |
|
apis/demos/example3
command
Sample program to show how to create a basic CRUD based web api for customers.
|
Sample program to show how to create a basic CRUD based web api for customers. |
|
apis/demos/example4
command
Sample program to show how to create a basic CRUD based web api for customers with a middleware component.
|
Sample program to show how to create a basic CRUD based web api for customers with a middleware component. |
|
auth/demos/example1
command
Sample program to show how to apply basic authentication with the standard library for your web request.
|
Sample program to show how to apply basic authentication with the standard library for your web request. |
|
auth/demos/example2
command
Sample program to show how to apply basic authentication with the goth package for your web request.
|
Sample program to show how to apply basic authentication with the goth package for your web request. |
|
basics/demos/example1
command
Sample program to show how to create a simple web service.
|
Sample program to show how to create a simple web service. |
|
basics/demos/example2
command
Sample program to show how to create and use your own mux.
|
Sample program to show how to create and use your own mux. |
|
basics/demos/example3
command
Sample program to show how to implement your own Handler.
|
Sample program to show how to implement your own Handler. |
|
basics/demos/example4
command
Sample program to show how to implement your own App Handler that can use any provided handler function.
|
Sample program to show how to implement your own App Handler that can use any provided handler function. |
|
basics/demos/example5
command
Sample program to show how to run the server using a goroutine and create goroutines to run multiple requests concurrently.
|
Sample program to show how to run the server using a goroutine and create goroutines to run multiple requests concurrently. |
|
consuming/demos/example6
command
Sample program to how to use JWT for authentication.
|
Sample program to how to use JWT for authentication. |
|
context/demos/example1
command
Sample program to show how to work with the Context package.
|
Sample program to show how to work with the Context package. |
|
context/demos/example2
command
Sample program to show how to work with the Gorilla Context package.
|
Sample program to show how to work with the Gorilla Context package. |
|
middleware/demos/example1
command
Sample program to show how to apply middleware.
|
Sample program to show how to apply middleware. |
|
middleware/demos/example2
command
Sample program to show how to apply middleware using negroni.
|
Sample program to show how to apply middleware using negroni. |
|
muxers/demos/example1
command
Sample program to show how to use the pat router.
|
Sample program to show how to use the pat router. |
|
muxers/demos/example2
command
Sample program to show how to use the httprouter router.
|
Sample program to show how to use the httprouter router. |
|
muxers/demos/example3
command
Sample program to show how to use the echo toolkit.
|
Sample program to show how to use the echo toolkit. |
|
posts/demos/example1
command
Sample program to show how to handle different verbs.
|
Sample program to show how to handle different verbs. |
|
posts/demos/example2
command
Sample program to show how to handle forms using a single handler for the GET and POST calls.
|
Sample program to show how to handle forms using a single handler for the GET and POST calls. |
|
posts/demos/example3
command
Sample program to show how to handle forms with JSON.
|
Sample program to show how to handle forms with JSON. |
|
posts/demos/example4
command
Sample program to show how to handle the uploading of file content in a request.
|
Sample program to show how to handle the uploading of file content in a request. |
|
rest/demos/example1
command
Sample program to show how to use a regex to handle REST based URL schemas and routes.
|
Sample program to show how to use a regex to handle REST based URL schemas and routes. |
|
serializers/demos/example1
command
Sample program to show how to use the JSON encoder.
|
Sample program to show how to use the JSON encoder. |
|
serializers/demos/example2
command
Sample program to show how to implement the json.Marshaler interface to dictate the marshaling.
|
Sample program to show how to implement the json.Marshaler interface to dictate the marshaling. |
|
serializers/demos/example3
command
Sample program to show how to use the XML encoder.
|
Sample program to show how to use the XML encoder. |
|
serializers/demos/example4
command
Sample program to show how to implement the xml.Marshaler interface to dictate the marshaling.
|
Sample program to show how to implement the xml.Marshaler interface to dictate the marshaling. |
|
sessions_cookies/demos/example1
command
Sample program to show how to use sessions in your web app.
|
Sample program to show how to use sessions in your web app. |
|
sessions_cookies/demos/example2
command
Sample program to show how to use a cookie in your web app.
|
Sample program to show how to use a cookie in your web app. |
|
sockets/demos/example1
command
Sample program on how to use the Google web socket package to bind HTTP requests.
|
Sample program on how to use the Google web socket package to bind HTTP requests. |
|
sockets/demos/example2
command
Sample program on how to use the Gorilla web socket package to bind HTTP requests.
|
Sample program on how to use the Gorilla web socket package to bind HTTP requests. |
|
templates/demos/example1
command
Sample program to show how to use create, parse and execute a simple template.
|
Sample program to show how to use create, parse and execute a simple template. |
|
templates/demos/example2
command
Sample program to show how to use create, parse and execute a template with simple data processing.
|
Sample program to show how to use create, parse and execute a template with simple data processing. |
|
templates/demos/example3
command
Sample program to show how to use create, parse and execute a template with simple data processing.
|
Sample program to show how to use create, parse and execute a template with simple data processing. |
|
templates/demos/example4
command
Sample program to show how to use create, parse and execute a template with simple data processing.
|
Sample program to show how to use create, parse and execute a template with simple data processing. |
|
templates/demos/example5
command
Sample program to show how to use create, parse and execute a template with simple data processing.
|
Sample program to show how to use create, parse and execute a template with simple data processing. |
|
templates/demos/example6
command
Sample program to show how to use create, parse and execute a template with simple data processing.
|
Sample program to show how to use create, parse and execute a template with simple data processing. |
|
templates/demos/example7
command
Sample program to show how to serve up static files from a web application and deliver a home page.
|
Sample program to show how to serve up static files from a web application and deliver a home page. |
|
templates/demos/example8
command
Sample program to show how to bundle assets, static files, etc into web application and access these bundled resources.
|
Sample program to show how to bundle assets, static files, etc into web application and access these bundled resources. |
|
testing/demos/language
command
Sample program to show how to create and use your own mux.
|
Sample program to show how to create and use your own mux. |
|
wranglingconcurrency
|
|
|
demos/gogrep
command
|
|
|
demos/race
command
|
|
|
exercises/buffered
command
|
|
|
exercises/channels/close
command
|
|
|
exercises/channels/signal
command
|
|
|
exercises/race
command
|
|
|
exercises/unbuffered
command
|
|
|
exercises/unbufferedfix
command
|
|
|
solutions/race
command
|
Click to show internal directories.
Click to hide internal directories.