build-web-application-with-golang

module
v0.0.0-...-c294b08 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2022 License: BSD-3-Clause

README

Multiple Language Versions

Donate

AliPay: alipay

English Donate:donate

Community

QQ群:148647580

BBS:http://gocn.io/

Contributors

Acknowledgments

License

Book License: CC BY-SA 3.0 License

Code License: BSD 3-Clause License

Directories

Path Synopsis
de
code/src/apps/ch.1.2
Example code for Chapter 1.2 from "Build Web Application with Golang" Purpose: Run this file to check if your workspace is setup correctly.
Example code for Chapter 1.2 from "Build Web Application with Golang" Purpose: Run this file to check if your workspace is setup correctly.
code/src/apps/ch.2.1
Example code for Chapter ? from "Build Web Application with Golang" Purpose: Hello world example demonstrating UTF-8 support.
Example code for Chapter ? from "Build Web Application with Golang" Purpose: Hello world example demonstrating UTF-8 support.
code/src/apps/ch.2.2
Example code for Chapter 2.2 from "Build Web Application with Golang" Purpose: Goes over the assignment and manipulation of basic data types.
Example code for Chapter 2.2 from "Build Web Application with Golang" Purpose: Goes over the assignment and manipulation of basic data types.
code/src/apps/ch.2.2/what_is_wrong_with_this
Example code for Chapter 2.2 from "Build Web Application with Golang" Purpose: Try to fix this program.
Example code for Chapter 2.2 from "Build Web Application with Golang" Purpose: Try to fix this program.
code/src/apps/ch.2.3
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Goes over if, else, switch conditions, loops and defer.
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Goes over if, else, switch conditions, loops and defer.
code/src/apps/ch.2.3/basic_functions
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Creating a basic function
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Creating a basic function
code/src/apps/ch.2.3/hidden_print_methods
As of Google go 1.1.2, `println()` and `print()` are hidden functions included from the runtime package.
As of Google go 1.1.2, `println()` and `print()` are hidden functions included from the runtime package.
code/src/apps/ch.2.3/import_packages
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows different ways of importing a package.
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows different ways of importing a package.
code/src/apps/ch.2.3/panic_and_recover
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Showing how to use `panic()` and `recover()`
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Showing how to use `panic()` and `recover()`
code/src/apps/ch.2.3/pass_by_value_and_pointer
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows passing a variable by value and reference
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows passing a variable by value and reference
code/src/apps/ch.2.3/type_function
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows how to define a function type
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows how to define a function type
code/src/apps/ch.2.3/variadic_functions
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows how to return multiple values from a function
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows how to return multiple values from a function
code/src/apps/ch.2.4
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Shows different ways of creating a struct
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Shows different ways of creating a struct
code/src/apps/ch.2.4/compare_age
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Shows you how to pass and use structs.
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Shows you how to pass and use structs.
code/src/apps/ch.2.4/embedded_structs
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Example of embedded fields
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Example of embedded fields
code/src/apps/ch.2.4/embedded_structs2
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Another example of embedded fields
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Another example of embedded fields
code/src/apps/ch.2.4/embedded_structs_with_name_conflict
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Shows a name conflict with a embedded field
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Shows a name conflict with a embedded field
code/src/apps/ch.2.5/attach_methods_to_struct
Example code from Chapter 2.5 Attach method to struct.
Example code from Chapter 2.5 Attach method to struct.
code/src/apps/ch.2.7/buffered_channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to use a buffered channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to use a buffered channel
code/src/apps/ch.2.7/goroutine
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to launch a simple gorountine
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to launch a simple gorountine
code/src/apps/ch.2.7/range_and_close_channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to close and interate through a channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to close and interate through a channel
code/src/apps/ch.2.7/select_channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to use `select`
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to use `select`
code/src/apps/ch.2.7/timeout
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to create and use a timeout
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to create and use a timeout
code/src/apps/ch.2.7/unbuffered_channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to create and use a unbuffered channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to create and use a unbuffered channel
code/src/apps/ch.3.2
Example code for Chapter 3.2 from "Build Web Application with Golang" Purpose: Shows how to acces the form values from the request
Example code for Chapter 3.2 from "Build Web Application with Golang" Purpose: Shows how to acces the form values from the request
code/src/apps/ch.3.4
Example code for Chapter 3.4 from "Build Web Application with Golang" Purpose: Shows how to create a handler for `http.ListenAndServe()` Run `go run main.go` then access `http://localhost:9090`
Example code for Chapter 3.4 from "Build Web Application with Golang" Purpose: Shows how to create a handler for `http.ListenAndServe()` Run `go run main.go` then access `http://localhost:9090`
code/src/apps/ch.4.1
Example code for Chapter 4.1 from "Build Web Application with Golang" Purpose: Shows how to create a simple login using a template Run: `go run main.go`, then access `http://localhost:9090` and `http://localhost:9090/login`
Example code for Chapter 4.1 from "Build Web Application with Golang" Purpose: Shows how to create a simple login using a template Run: `go run main.go`, then access `http://localhost:9090` and `http://localhost:9090/login`
code/src/apps/ch.4.2
Example code for Chapter 4.2 from "Build Web Application with Golang" Purpose: Shows how to perform server-side validation of user input from a form.
Example code for Chapter 4.2 from "Build Web Application with Golang" Purpose: Shows how to perform server-side validation of user input from a form.
code/src/apps/ch.4.2/validator
This file contains all the validators to validate the profile page.
This file contains all the validators to validate the profile page.
code/src/apps/ch.4.3
Example code for Chapter 4.3 from "Build Web Application with Golang" Purpose: Shows how to properly escape input
Example code for Chapter 4.3 from "Build Web Application with Golang" Purpose: Shows how to properly escape input
code/src/apps/ch.4.4
Example code for Chapter 3.2 from "Build Web Application with Golang" Purpose: Shows how to prevent duplicate submissions by using tokens Example code for Chapter 4.4 based off the code from Chapter 4.2 Run `go run main.go` then access http://localhost:9090
Example code for Chapter 3.2 from "Build Web Application with Golang" Purpose: Shows how to prevent duplicate submissions by using tokens Example code for Chapter 4.4 based off the code from Chapter 4.2 Run `go run main.go` then access http://localhost:9090
code/src/apps/ch.4.4/nonce
A nonce is a number or string used only once.
A nonce is a number or string used only once.
code/src/apps/ch.4.4/validator
This file contains all the validators to validate the profile page.
This file contains all the validators to validate the profile page.
code/src/apps/ch.4.5
Example code for Chapter 4.5 Purpose is to create a server to handle uploading files.
Example code for Chapter 4.5 Purpose is to create a server to handle uploading files.
code/src/apps/ch.4.5/nonce
A nonce is a number or string used only once.
A nonce is a number or string used only once.
code/src/apps/ch.4.5/validator
This file contains all the validators to validate the profile page.
This file contains all the validators to validate the profile page.
code/src/apps/ch.5.2
Example code for Chapter 5.2 from "Build Web Application with Golang" Purpose: Use SQL driver to perform simple CRUD operations.
Example code for Chapter 5.2 from "Build Web Application with Golang" Purpose: Use SQL driver to perform simple CRUD operations.
code/src/apps/ch.5.3
Example code for Chapter 5.3 from "Build Web Application with Golang" Purpose: Shows how to run simple CRUD operations using a sqlite driver
Example code for Chapter 5.3 from "Build Web Application with Golang" Purpose: Shows how to run simple CRUD operations using a sqlite driver
code/src/apps/ch.5.4
Example code for Chapter 5.4 from "Build Web Application with Golang" Purpose: Show how to perform CRUD operations using a postgres driver
Example code for Chapter 5.4 from "Build Web Application with Golang" Purpose: Show how to perform CRUD operations using a postgres driver
code/src/apps/ch.5.5
Example code for Chapter 5.5 Purpose is to show to use BeeDB ORM for basic CRUD operations for sqlite3
Example code for Chapter 5.5 Purpose is to show to use BeeDB ORM for basic CRUD operations for sqlite3
code/src/apps/ch.5.6/mongodb
Example code for Chapter 5.6 from "Build Web Application with Golang" Purpose: Shows you have to perform basic CRUD operations for a mongodb driver.
Example code for Chapter 5.6 from "Build Web Application with Golang" Purpose: Shows you have to perform basic CRUD operations for a mongodb driver.
code/src/apps/ch.5.6/redis
Example code for Chapter 5.6 from "Build Web Application with Golang" Purpose: Shows you have to perform basic CRUD operations for a redis driver.
Example code for Chapter 5.6 from "Build Web Application with Golang" Purpose: Shows you have to perform basic CRUD operations for a redis driver.
code/src/mymath
Example code for Chapter 1.2 from "Build Web Application with Golang" Purpose: Shows how to create a simple package called `mymath` This package must be imported from another go file to run.
Example code for Chapter 1.2 from "Build Web Application with Golang" Purpose: Shows how to create a simple package called `mymath` This package must be imported from another go file to run.
en
code/src/apps/ch.1.2
Example code for Chapter 1.2 from "Build Web Application with Golang" Purpose: Run this file to check if your workspace is setup correctly.
Example code for Chapter 1.2 from "Build Web Application with Golang" Purpose: Run this file to check if your workspace is setup correctly.
code/src/apps/ch.2.1
Example code for Chapter ? from "Build Web Application with Golang" Purpose: Hello world example demonstrating UTF-8 support.
Example code for Chapter ? from "Build Web Application with Golang" Purpose: Hello world example demonstrating UTF-8 support.
code/src/apps/ch.2.2
Example code for Chapter 2.2 from "Build Web Application with Golang" Purpose: Goes over the assignment and manipulation of basic data types.
Example code for Chapter 2.2 from "Build Web Application with Golang" Purpose: Goes over the assignment and manipulation of basic data types.
code/src/apps/ch.2.2/what_is_wrong_with_this
Example code for Chapter 2.2 from "Build Web Application with Golang" Purpose: Try to fix this program.
Example code for Chapter 2.2 from "Build Web Application with Golang" Purpose: Try to fix this program.
code/src/apps/ch.2.3
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Goes over if, else, switch conditions, loops and defer.
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Goes over if, else, switch conditions, loops and defer.
code/src/apps/ch.2.3/basic_functions
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Creating a basic function
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Creating a basic function
code/src/apps/ch.2.3/hidden_print_methods
As of Google go 1.1.2, `println()` and `print()` are hidden functions included from the runtime package.
As of Google go 1.1.2, `println()` and `print()` are hidden functions included from the runtime package.
code/src/apps/ch.2.3/import_packages
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows different ways of importing a package.
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows different ways of importing a package.
code/src/apps/ch.2.3/panic_and_recover
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Showing how to use `panic()` and `recover()`
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Showing how to use `panic()` and `recover()`
code/src/apps/ch.2.3/pass_by_value_and_pointer
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows passing a variable by value and reference
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows passing a variable by value and reference
code/src/apps/ch.2.3/type_function
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows how to define a function type
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows how to define a function type
code/src/apps/ch.2.3/variadic_functions
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows how to return multiple values from a function
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows how to return multiple values from a function
code/src/apps/ch.2.4
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Shows different ways of creating a struct
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Shows different ways of creating a struct
code/src/apps/ch.2.4/compare_age
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Shows you how to pass and use structs.
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Shows you how to pass and use structs.
code/src/apps/ch.2.4/embedded_structs
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Example of embedded fields
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Example of embedded fields
code/src/apps/ch.2.4/embedded_structs2
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Another example of embedded fields
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Another example of embedded fields
code/src/apps/ch.2.4/embedded_structs_with_name_conflict
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Shows a name conflict with a embedded field
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Shows a name conflict with a embedded field
code/src/apps/ch.2.5/attach_methods_to_struct
Example code from Chapter 2.5 Attach method to struct.
Example code from Chapter 2.5 Attach method to struct.
code/src/apps/ch.2.7/buffered_channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to use a buffered channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to use a buffered channel
code/src/apps/ch.2.7/goroutine
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to launch a simple gorountine
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to launch a simple gorountine
code/src/apps/ch.2.7/range_and_close_channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to close and interate through a channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to close and interate through a channel
code/src/apps/ch.2.7/select_channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to use `select`
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to use `select`
code/src/apps/ch.2.7/timeout
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to create and use a timeout
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to create and use a timeout
code/src/apps/ch.2.7/unbuffered_channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to create and use a unbuffered channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to create and use a unbuffered channel
code/src/apps/ch.3.2
Example code for Chapter 3.2 from "Build Web Application with Golang" Purpose: Shows how to acces the form values from the request
Example code for Chapter 3.2 from "Build Web Application with Golang" Purpose: Shows how to acces the form values from the request
code/src/apps/ch.3.4
Example code for Chapter 3.4 from "Build Web Application with Golang" Purpose: Shows how to create a handler for `http.ListenAndServe()` Run `go run main.go` then access `http://localhost:9090`
Example code for Chapter 3.4 from "Build Web Application with Golang" Purpose: Shows how to create a handler for `http.ListenAndServe()` Run `go run main.go` then access `http://localhost:9090`
code/src/apps/ch.4.1
Example code for Chapter 4.1 from "Build Web Application with Golang" Purpose: Shows how to create a simple login using a template Run: `go run main.go`, then access `http://localhost:9090` and `http://localhost:9090/login`
Example code for Chapter 4.1 from "Build Web Application with Golang" Purpose: Shows how to create a simple login using a template Run: `go run main.go`, then access `http://localhost:9090` and `http://localhost:9090/login`
code/src/apps/ch.4.2
Example code for Chapter 4.2 from "Build Web Application with Golang" Purpose: Shows how to perform server-side validation of user input from a form.
Example code for Chapter 4.2 from "Build Web Application with Golang" Purpose: Shows how to perform server-side validation of user input from a form.
code/src/apps/ch.4.2/validator
This file contains all the validators to validate the profile page.
This file contains all the validators to validate the profile page.
code/src/apps/ch.4.3
Example code for Chapter 4.3 from "Build Web Application with Golang" Purpose: Shows how to properly escape input
Example code for Chapter 4.3 from "Build Web Application with Golang" Purpose: Shows how to properly escape input
code/src/apps/ch.4.4
Example code for Chapter 3.2 from "Build Web Application with Golang" Purpose: Shows how to prevent duplicate submissions by using tokens Example code for Chapter 4.4 based off the code from Chapter 4.2 Run `go run main.go` then access http://localhost:9090
Example code for Chapter 3.2 from "Build Web Application with Golang" Purpose: Shows how to prevent duplicate submissions by using tokens Example code for Chapter 4.4 based off the code from Chapter 4.2 Run `go run main.go` then access http://localhost:9090
code/src/apps/ch.4.4/nonce
A nonce is a number or string used only once.
A nonce is a number or string used only once.
code/src/apps/ch.4.4/validator
This file contains all the validators to validate the profile page.
This file contains all the validators to validate the profile page.
code/src/apps/ch.4.5
Example code for Chapter 4.5 Purpose is to create a server to handle uploading files.
Example code for Chapter 4.5 Purpose is to create a server to handle uploading files.
code/src/apps/ch.4.5/nonce
A nonce is a number or string used only once.
A nonce is a number or string used only once.
code/src/apps/ch.4.5/validator
This file contains all the validators to validate the profile page.
This file contains all the validators to validate the profile page.
code/src/apps/ch.5.2
Example code for Chapter 5.2 from "Build Web Application with Golang" Purpose: Use SQL driver to perform simple CRUD operations.
Example code for Chapter 5.2 from "Build Web Application with Golang" Purpose: Use SQL driver to perform simple CRUD operations.
code/src/apps/ch.5.3
Example code for Chapter 5.3 from "Build Web Application with Golang" Purpose: Shows how to run simple CRUD operations using a sqlite driver
Example code for Chapter 5.3 from "Build Web Application with Golang" Purpose: Shows how to run simple CRUD operations using a sqlite driver
code/src/apps/ch.5.4
Example code for Chapter 5.4 from "Build Web Application with Golang" Purpose: Show how to perform CRUD operations using a postgres driver
Example code for Chapter 5.4 from "Build Web Application with Golang" Purpose: Show how to perform CRUD operations using a postgres driver
code/src/apps/ch.5.5
Example code for Chapter 5.5 Purpose is to show to use BeeDB ORM for basic CRUD operations for sqlite3
Example code for Chapter 5.5 Purpose is to show to use BeeDB ORM for basic CRUD operations for sqlite3
code/src/apps/ch.5.6/mongodb
Example code for Chapter 5.6 from "Build Web Application with Golang" Purpose: Shows you have to perform basic CRUD operations for a mongodb driver.
Example code for Chapter 5.6 from "Build Web Application with Golang" Purpose: Shows you have to perform basic CRUD operations for a mongodb driver.
code/src/apps/ch.5.6/redis
Example code for Chapter 5.6 from "Build Web Application with Golang" Purpose: Shows you have to perform basic CRUD operations for a redis driver.
Example code for Chapter 5.6 from "Build Web Application with Golang" Purpose: Shows you have to perform basic CRUD operations for a redis driver.
code/src/mymath
Example code for Chapter 1.2 from "Build Web Application with Golang" Purpose: Shows how to create a simple package called `mymath` This package must be imported from another go file to run.
Example code for Chapter 1.2 from "Build Web Application with Golang" Purpose: Shows how to create a simple package called `mymath` This package must be imported from another go file to run.
es
code/src/apps/ch.1.2
Código de ejemplo para el capítulo 1.2 del libro "Construye Aplicaciones Web con Golang" Propósito: Ejecuta este archivo para verificar que tu espacio de trabajo está configurado correctamente.
Código de ejemplo para el capítulo 1.2 del libro "Construye Aplicaciones Web con Golang" Propósito: Ejecuta este archivo para verificar que tu espacio de trabajo está configurado correctamente.
code/src/mymath
Código de ejmplo para el capítulo 1.2 de "Construye Aplicaciones Web con Golang" Propósito: Muestra como crear un paquete simple llamado `mymath` Este paquete debe ser importado desde otro archivo Go para poder ejecutarse.
Código de ejmplo para el capítulo 1.2 de "Construye Aplicaciones Web con Golang" Propósito: Muestra como crear un paquete simple llamado `mymath` Este paquete debe ser importado desde otro archivo Go para poder ejecutarse.
fa
code/src/apps/ch.1.2
Example code for Chapter 1.2 from "Build Web Application with Golang" Purpose: Run this file to check if your workspace is setup correctly.
Example code for Chapter 1.2 from "Build Web Application with Golang" Purpose: Run this file to check if your workspace is setup correctly.
code/src/apps/ch.2.1
Example code for Chapter ? from "Build Web Application with Golang" Purpose: Hello world example demonstrating UTF-8 support.
Example code for Chapter ? from "Build Web Application with Golang" Purpose: Hello world example demonstrating UTF-8 support.
code/src/apps/ch.2.2
Example code for Chapter 2.2 from "Build Web Application with Golang" Purpose: Goes over the assignment and manipulation of basic data types.
Example code for Chapter 2.2 from "Build Web Application with Golang" Purpose: Goes over the assignment and manipulation of basic data types.
code/src/apps/ch.2.2/what_is_wrong_with_this
Example code for Chapter 2.2 from "Build Web Application with Golang" Purpose: Try to fix this program.
Example code for Chapter 2.2 from "Build Web Application with Golang" Purpose: Try to fix this program.
code/src/apps/ch.2.3
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Goes over if, else, switch conditions, loops and defer.
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Goes over if, else, switch conditions, loops and defer.
code/src/apps/ch.2.3/basic_functions
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Creating a basic function
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Creating a basic function
code/src/apps/ch.2.3/hidden_print_methods
As of Google go 1.1.2, `println()` and `print()` are hidden functions included from the runtime package.
As of Google go 1.1.2, `println()` and `print()` are hidden functions included from the runtime package.
code/src/apps/ch.2.3/import_packages
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows different ways of importing a package.
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows different ways of importing a package.
code/src/apps/ch.2.3/panic_and_recover
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Showing how to use `panic()` and `recover()`
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Showing how to use `panic()` and `recover()`
code/src/apps/ch.2.3/pass_by_value_and_pointer
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows passing a variable by value and reference
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows passing a variable by value and reference
code/src/apps/ch.2.3/type_function
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows how to define a function type
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows how to define a function type
code/src/apps/ch.2.3/variadic_functions
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows how to return multiple values from a function
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows how to return multiple values from a function
code/src/apps/ch.2.4
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Shows different ways of creating a struct
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Shows different ways of creating a struct
code/src/apps/ch.2.4/compare_age
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Shows you how to pass and use structs.
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Shows you how to pass and use structs.
code/src/apps/ch.2.4/embedded_structs
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Example of embedded fields
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Example of embedded fields
code/src/apps/ch.2.4/embedded_structs2
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Another example of embedded fields
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Another example of embedded fields
code/src/apps/ch.2.4/embedded_structs_with_name_conflict
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Shows a name conflict with a embedded field
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Shows a name conflict with a embedded field
code/src/apps/ch.2.5/attach_methods_to_struct
Example code from Chapter 2.5 Attach method to struct.
Example code from Chapter 2.5 Attach method to struct.
code/src/apps/ch.2.7/buffered_channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to use a buffered channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to use a buffered channel
code/src/apps/ch.2.7/goroutine
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to launch a simple gorountine
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to launch a simple gorountine
code/src/apps/ch.2.7/range_and_close_channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to close and interate through a channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to close and interate through a channel
code/src/apps/ch.2.7/select_channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to use `select`
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to use `select`
code/src/apps/ch.2.7/timeout
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to create and use a timeout
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to create and use a timeout
code/src/apps/ch.2.7/unbuffered_channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to create and use a unbuffered channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to create and use a unbuffered channel
code/src/apps/ch.3.2
Example code for Chapter 3.2 from "Build Web Application with Golang" Purpose: Shows how to acces the form values from the request
Example code for Chapter 3.2 from "Build Web Application with Golang" Purpose: Shows how to acces the form values from the request
code/src/apps/ch.3.4
Example code for Chapter 3.4 from "Build Web Application with Golang" Purpose: Shows how to create a handler for `http.ListenAndServe()` Run `go run main.go` then access `http://localhost:9090`
Example code for Chapter 3.4 from "Build Web Application with Golang" Purpose: Shows how to create a handler for `http.ListenAndServe()` Run `go run main.go` then access `http://localhost:9090`
code/src/apps/ch.4.1
Example code for Chapter 4.1 from "Build Web Application with Golang" Purpose: Shows how to create a simple login using a template Run: `go run main.go`, then access `http://localhost:9090` and `http://localhost:9090/login`
Example code for Chapter 4.1 from "Build Web Application with Golang" Purpose: Shows how to create a simple login using a template Run: `go run main.go`, then access `http://localhost:9090` and `http://localhost:9090/login`
code/src/apps/ch.4.2
Example code for Chapter 4.2 from "Build Web Application with Golang" Purpose: Shows how to perform server-side validation of user input from a form.
Example code for Chapter 4.2 from "Build Web Application with Golang" Purpose: Shows how to perform server-side validation of user input from a form.
code/src/apps/ch.4.2/validator
This file contains all the validators to validate the profile page.
This file contains all the validators to validate the profile page.
code/src/apps/ch.4.3
Example code for Chapter 4.3 from "Build Web Application with Golang" Purpose: Shows how to properly escape input
Example code for Chapter 4.3 from "Build Web Application with Golang" Purpose: Shows how to properly escape input
code/src/apps/ch.4.4
Example code for Chapter 3.2 from "Build Web Application with Golang" Purpose: Shows how to prevent duplicate submissions by using tokens Example code for Chapter 4.4 based off the code from Chapter 4.2 Run `go run main.go` then access http://localhost:9090
Example code for Chapter 3.2 from "Build Web Application with Golang" Purpose: Shows how to prevent duplicate submissions by using tokens Example code for Chapter 4.4 based off the code from Chapter 4.2 Run `go run main.go` then access http://localhost:9090
code/src/apps/ch.4.4/nonce
A nonce is a number or string used only once.
A nonce is a number or string used only once.
code/src/apps/ch.4.4/validator
This file contains all the validators to validate the profile page.
This file contains all the validators to validate the profile page.
code/src/apps/ch.4.5
Example code for Chapter 4.5 Purpose is to create a server to handle uploading files.
Example code for Chapter 4.5 Purpose is to create a server to handle uploading files.
code/src/apps/ch.4.5/nonce
A nonce is a number or string used only once.
A nonce is a number or string used only once.
code/src/apps/ch.4.5/validator
This file contains all the validators to validate the profile page.
This file contains all the validators to validate the profile page.
code/src/apps/ch.5.2
Example code for Chapter 5.2 from "Build Web Application with Golang" Purpose: Use SQL driver to perform simple CRUD operations.
Example code for Chapter 5.2 from "Build Web Application with Golang" Purpose: Use SQL driver to perform simple CRUD operations.
code/src/apps/ch.5.3
Example code for Chapter 5.3 from "Build Web Application with Golang" Purpose: Shows how to run simple CRUD operations using a sqlite driver
Example code for Chapter 5.3 from "Build Web Application with Golang" Purpose: Shows how to run simple CRUD operations using a sqlite driver
code/src/apps/ch.5.4
Example code for Chapter 5.4 from "Build Web Application with Golang" Purpose: Show how to perform CRUD operations using a postgres driver
Example code for Chapter 5.4 from "Build Web Application with Golang" Purpose: Show how to perform CRUD operations using a postgres driver
code/src/apps/ch.5.5
Example code for Chapter 5.5 Purpose is to show to use BeeDB ORM for basic CRUD operations for sqlite3
Example code for Chapter 5.5 Purpose is to show to use BeeDB ORM for basic CRUD operations for sqlite3
code/src/apps/ch.5.6/mongodb
Example code for Chapter 5.6 from "Build Web Application with Golang" Purpose: Shows you have to perform basic CRUD operations for a mongodb driver.
Example code for Chapter 5.6 from "Build Web Application with Golang" Purpose: Shows you have to perform basic CRUD operations for a mongodb driver.
code/src/apps/ch.5.6/redis
Example code for Chapter 5.6 from "Build Web Application with Golang" Purpose: Shows you have to perform basic CRUD operations for a redis driver.
Example code for Chapter 5.6 from "Build Web Application with Golang" Purpose: Shows you have to perform basic CRUD operations for a redis driver.
code/src/mymath
Example code for Chapter 1.2 from "Build Web Application with Golang" Purpose: Shows how to create a simple package called `mymath` This package must be imported from another go file to run.
Example code for Chapter 1.2 from "Build Web Application with Golang" Purpose: Shows how to create a simple package called `mymath` This package must be imported from another go file to run.
pt-br
code/src/apps/ch.1.2
Código de exemplo para o Capítulo 1.2 do "Build Web Application with Golang" Propósito: Execute este arquivo para verificar se o seu workspace está corretamente configurado.
Código de exemplo para o Capítulo 1.2 do "Build Web Application with Golang" Propósito: Execute este arquivo para verificar se o seu workspace está corretamente configurado.
code/src/apps/ch.2.1
Código de exemplo para o Capítulo 2.1 do "Build Web Application with Golang" Propósito: Exemplo de Hello world demonstrando suporte para UTF-8.
Código de exemplo para o Capítulo 2.1 do "Build Web Application with Golang" Propósito: Exemplo de Hello world demonstrando suporte para UTF-8.
code/src/apps/ch.2.2
Código de exemplo para o Capítulo 2.2 do "Build Web Application with Golang" Propósito: Revisar os conceitos de atribuição e manipulação de tipos de dados básicos.
Código de exemplo para o Capítulo 2.2 do "Build Web Application with Golang" Propósito: Revisar os conceitos de atribuição e manipulação de tipos de dados básicos.
code/src/apps/ch.2.2/what_is_wrong_with_this
Código de exemplo para o Capítulo 2.2 do "Build Web Application with Golang" Propósito: Tente corrigir este programa.
Código de exemplo para o Capítulo 2.2 do "Build Web Application with Golang" Propósito: Tente corrigir este programa.
code/src/apps/ch.2.3
Código de exemplo do capítulo 2.3 de "Build Web Application with Golang" Propósito: mostra alguns exemplos de if, else, switch, loops e defer.
Código de exemplo do capítulo 2.3 de "Build Web Application with Golang" Propósito: mostra alguns exemplos de if, else, switch, loops e defer.
code/src/apps/ch.2.3/basic_functions
Código de exemplo do capítulo 2.3 de "Build Web Application with Golang" Propósito: Criando uma função básica
Código de exemplo do capítulo 2.3 de "Build Web Application with Golang" Propósito: Criando uma função básica
code/src/apps/ch.2.3/hidden_print_methods
A partir do Google go 1.1.2, `println()` e `print()` são funções ocultas incluídas no pacote de tempo de execução.
A partir do Google go 1.1.2, `println()` e `print()` são funções ocultas incluídas no pacote de tempo de execução.
code/src/apps/ch.2.3/import_packages
Código de exemplo do capítulo 2.3 de "Build Web Application with Golang" Propósito: mostra diferentes formas de importar um pacote.
Código de exemplo do capítulo 2.3 de "Build Web Application with Golang" Propósito: mostra diferentes formas de importar um pacote.
code/src/apps/ch.2.3/panic_and_recover
Código de exemplo do capítulo 2.3 de "Build Web Application with Golang" Propósito: mostrar como usar `panic()` e `recover()`
Código de exemplo do capítulo 2.3 de "Build Web Application with Golang" Propósito: mostrar como usar `panic()` e `recover()`
code/src/apps/ch.2.3/pass_by_value_and_pointer
Código de exemplo do capítulo 2.3 de "Build Web Application with Golang" Propósito: mostra como passar uma variável por valor e por referência
Código de exemplo do capítulo 2.3 de "Build Web Application with Golang" Propósito: mostra como passar uma variável por valor e por referência
code/src/apps/ch.2.3/type_function
Código de exemplo do capítulo 2.3 de "Build Web Application with Golang" Propósito: mostra como definir um tipo de função
Código de exemplo do capítulo 2.3 de "Build Web Application with Golang" Propósito: mostra como definir um tipo de função
code/src/apps/ch.2.3/variadic_functions
Código de exemplo do capítulo 2.3 de "Build Web Application with Golang" Propósito: mostra como retornar múltiplos valores de uma função
Código de exemplo do capítulo 2.3 de "Build Web Application with Golang" Propósito: mostra como retornar múltiplos valores de uma função
code/src/apps/ch.2.4
Código de exemplo da seção 2.4 de "Build Web Application with Golang" Propósito: Mostrar formas diferentes de criar uma estrutura
Código de exemplo da seção 2.4 de "Build Web Application with Golang" Propósito: Mostrar formas diferentes de criar uma estrutura
code/src/apps/ch.2.4/compare_age
Código de exemplo da seção 2.4 de "Build Web Application with Golang" Propósito: Mostrar como utilizar estruturas em Go.
Código de exemplo da seção 2.4 de "Build Web Application with Golang" Propósito: Mostrar como utilizar estruturas em Go.
code/src/apps/ch.2.4/embedded_structs
Código de exemplo da seção 2.4 de "Build Web Application with Golang" Propósito: Exemplo de campos incorporados
Código de exemplo da seção 2.4 de "Build Web Application with Golang" Propósito: Exemplo de campos incorporados
code/src/apps/ch.2.4/embedded_structs2
Código de exemplo da seção 2.4 de "Build Web Application with Golang" Propósito: Outro exemplo de campos incorporados
Código de exemplo da seção 2.4 de "Build Web Application with Golang" Propósito: Outro exemplo de campos incorporados
code/src/apps/ch.2.4/embedded_structs_with_name_conflict
Código de exemplo da seção 2.4 de "Build Web Application with Golang" Propósito: Mostra um conflito de nomes com um campo incorporado
Código de exemplo da seção 2.4 de "Build Web Application with Golang" Propósito: Mostra um conflito de nomes com um campo incorporado
code/src/apps/ch.2.5/attach_methods_to_struct
Example code from Chapter 2.5 Attach method to struct.
Example code from Chapter 2.5 Attach method to struct.
code/src/apps/ch.2.7/buffered_channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to use a buffered channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to use a buffered channel
code/src/apps/ch.2.7/goroutine
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to launch a simple gorountine
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to launch a simple gorountine
code/src/apps/ch.2.7/range_and_close_channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to close and interate through a channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to close and interate through a channel
code/src/apps/ch.2.7/select_channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to use `select`
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to use `select`
code/src/apps/ch.2.7/timeout
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to create and use a timeout
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to create and use a timeout
code/src/apps/ch.2.7/unbuffered_channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to create and use a unbuffered channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to create and use a unbuffered channel
code/src/apps/ch.3.2
Example code for Chapter 3.2 from "Build Web Application with Golang" Purpose: Shows how to acces the form values from the request
Example code for Chapter 3.2 from "Build Web Application with Golang" Purpose: Shows how to acces the form values from the request
code/src/apps/ch.3.4
Example code for Chapter 3.4 from "Build Web Application with Golang" Purpose: Shows how to create a handler for `http.ListenAndServe()` Run `go run main.go` then access `http://localhost:9090`
Example code for Chapter 3.4 from "Build Web Application with Golang" Purpose: Shows how to create a handler for `http.ListenAndServe()` Run `go run main.go` then access `http://localhost:9090`
code/src/apps/ch.4.1
Example code for Chapter 4.1 from "Build Web Application with Golang" Purpose: Shows how to create a simple login using a template Run: `go run main.go`, then access `http://localhost:9090` and `http://localhost:9090/login`
Example code for Chapter 4.1 from "Build Web Application with Golang" Purpose: Shows how to create a simple login using a template Run: `go run main.go`, then access `http://localhost:9090` and `http://localhost:9090/login`
code/src/apps/ch.4.2
Example code for Chapter 4.2 from "Build Web Application with Golang" Purpose: Shows how to perform server-side validation of user input from a form.
Example code for Chapter 4.2 from "Build Web Application with Golang" Purpose: Shows how to perform server-side validation of user input from a form.
code/src/apps/ch.4.2/validator
This file contains all the validators to validate the profile page.
This file contains all the validators to validate the profile page.
code/src/apps/ch.4.3
Example code for Chapter 4.3 from "Build Web Application with Golang" Purpose: Shows how to properly escape input
Example code for Chapter 4.3 from "Build Web Application with Golang" Purpose: Shows how to properly escape input
code/src/apps/ch.4.4
Example code for Chapter 3.2 from "Build Web Application with Golang" Purpose: Shows how to prevent duplicate submissions by using tokens Example code for Chapter 4.4 based off the code from Chapter 4.2 Run `go run main.go` then access http://localhost:9090
Example code for Chapter 3.2 from "Build Web Application with Golang" Purpose: Shows how to prevent duplicate submissions by using tokens Example code for Chapter 4.4 based off the code from Chapter 4.2 Run `go run main.go` then access http://localhost:9090
code/src/apps/ch.4.4/nonce
A nonce is a number or string used only once.
A nonce is a number or string used only once.
code/src/apps/ch.4.4/validator
This file contains all the validators to validate the profile page.
This file contains all the validators to validate the profile page.
code/src/apps/ch.4.5
Example code for Chapter 4.5 Purpose is to create a server to handle uploading files.
Example code for Chapter 4.5 Purpose is to create a server to handle uploading files.
code/src/apps/ch.4.5/nonce
A nonce is a number or string used only once.
A nonce is a number or string used only once.
code/src/apps/ch.4.5/validator
This file contains all the validators to validate the profile page.
This file contains all the validators to validate the profile page.
code/src/apps/ch.5.2
Example code for Chapter 5.2 from "Build Web Application with Golang" Purpose: Use SQL driver to perform simple CRUD operations.
Example code for Chapter 5.2 from "Build Web Application with Golang" Purpose: Use SQL driver to perform simple CRUD operations.
code/src/apps/ch.5.3
Example code for Chapter 5.3 from "Build Web Application with Golang" Purpose: Shows how to run simple CRUD operations using a sqlite driver
Example code for Chapter 5.3 from "Build Web Application with Golang" Purpose: Shows how to run simple CRUD operations using a sqlite driver
code/src/apps/ch.5.4
Example code for Chapter 5.4 from "Build Web Application with Golang" Purpose: Show how to perform CRUD operations using a postgres driver
Example code for Chapter 5.4 from "Build Web Application with Golang" Purpose: Show how to perform CRUD operations using a postgres driver
code/src/apps/ch.5.5
Example code for Chapter 5.5 Purpose is to show to use BeeDB ORM for basic CRUD operations for sqlite3
Example code for Chapter 5.5 Purpose is to show to use BeeDB ORM for basic CRUD operations for sqlite3
code/src/apps/ch.5.6/mongodb
Example code for Chapter 5.6 from "Build Web Application with Golang" Purpose: Shows you have to perform basic CRUD operations for a mongodb driver.
Example code for Chapter 5.6 from "Build Web Application with Golang" Purpose: Shows you have to perform basic CRUD operations for a mongodb driver.
code/src/apps/ch.5.6/redis
Example code for Chapter 5.6 from "Build Web Application with Golang" Purpose: Shows you have to perform basic CRUD operations for a redis driver.
Example code for Chapter 5.6 from "Build Web Application with Golang" Purpose: Shows you have to perform basic CRUD operations for a redis driver.
code/src/mymath
Example code for Chapter 1.2 from "Build Web Application with Golang" Purpose: Shows how to create a simple package called `mymath` This package must be imported from another go file to run.
Example code for Chapter 1.2 from "Build Web Application with Golang" Purpose: Shows how to create a simple package called `mymath` This package must be imported from another go file to run.
th
code/src/apps/ch.1.2
Example code for Chapter 1.2 from "Build Web Application with Golang" Purpose: Run this file to check if your workspace is setup correctly.
Example code for Chapter 1.2 from "Build Web Application with Golang" Purpose: Run this file to check if your workspace is setup correctly.
code/src/apps/ch.2.1
Example code for Chapter ? from "Build Web Application with Golang" Purpose: Hello world example demonstrating UTF-8 support.
Example code for Chapter ? from "Build Web Application with Golang" Purpose: Hello world example demonstrating UTF-8 support.
code/src/apps/ch.2.2
Example code for Chapter 2.2 from "Build Web Application with Golang" Purpose: Goes over the assignment and manipulation of basic data types.
Example code for Chapter 2.2 from "Build Web Application with Golang" Purpose: Goes over the assignment and manipulation of basic data types.
code/src/apps/ch.2.2/what_is_wrong_with_this
Example code for Chapter 2.2 from "Build Web Application with Golang" Purpose: Try to fix this program.
Example code for Chapter 2.2 from "Build Web Application with Golang" Purpose: Try to fix this program.
code/src/apps/ch.2.3
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Goes over if, else, switch conditions, loops and defer.
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Goes over if, else, switch conditions, loops and defer.
code/src/apps/ch.2.3/basic_functions
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Creating a basic function
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Creating a basic function
code/src/apps/ch.2.3/hidden_print_methods
As of Google go 1.1.2, `println()` and `print()` are hidden functions included from the runtime package.
As of Google go 1.1.2, `println()` and `print()` are hidden functions included from the runtime package.
code/src/apps/ch.2.3/import_packages
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows different ways of importing a package.
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows different ways of importing a package.
code/src/apps/ch.2.3/panic_and_recover
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Showing how to use `panic()` and `recover()`
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Showing how to use `panic()` and `recover()`
code/src/apps/ch.2.3/pass_by_value_and_pointer
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows passing a variable by value and reference
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows passing a variable by value and reference
code/src/apps/ch.2.3/type_function
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows how to define a function type
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows how to define a function type
code/src/apps/ch.2.3/variadic_functions
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows how to return multiple values from a function
Example code for Chapter 2.3 from "Build Web Application with Golang" Purpose: Shows how to return multiple values from a function
code/src/apps/ch.2.4
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Shows different ways of creating a struct
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Shows different ways of creating a struct
code/src/apps/ch.2.4/compare_age
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Shows you how to pass and use structs.
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Shows you how to pass and use structs.
code/src/apps/ch.2.4/embedded_structs
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Example of embedded fields
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Example of embedded fields
code/src/apps/ch.2.4/embedded_structs2
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Another example of embedded fields
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Another example of embedded fields
code/src/apps/ch.2.4/embedded_structs_with_name_conflict
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Shows a name conflict with a embedded field
Example code for Chapter 2.4 from "Build Web Application with Golang" Purpose: Shows a name conflict with a embedded field
code/src/apps/ch.2.5/attach_methods_to_struct
Example code from Chapter 2.5 Attach method to struct.
Example code from Chapter 2.5 Attach method to struct.
code/src/apps/ch.2.7/buffered_channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to use a buffered channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to use a buffered channel
code/src/apps/ch.2.7/goroutine
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to launch a simple gorountine
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to launch a simple gorountine
code/src/apps/ch.2.7/range_and_close_channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to close and interate through a channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to close and interate through a channel
code/src/apps/ch.2.7/select_channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to use `select`
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to use `select`
code/src/apps/ch.2.7/timeout
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to create and use a timeout
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to create and use a timeout
code/src/apps/ch.2.7/unbuffered_channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to create and use a unbuffered channel
Example code for Chapter 2.7 from "Build Web Application with Golang" Purpose: Shows how to create and use a unbuffered channel
code/src/apps/ch.3.2
Example code for Chapter 3.2 from "Build Web Application with Golang" Purpose: Shows how to acces the form values from the request
Example code for Chapter 3.2 from "Build Web Application with Golang" Purpose: Shows how to acces the form values from the request
code/src/apps/ch.3.4
Example code for Chapter 3.4 from "Build Web Application with Golang" Purpose: Shows how to create a handler for `http.ListenAndServe()` Run `go run main.go` then access `http://localhost:9090`
Example code for Chapter 3.4 from "Build Web Application with Golang" Purpose: Shows how to create a handler for `http.ListenAndServe()` Run `go run main.go` then access `http://localhost:9090`
code/src/apps/ch.4.1
Example code for Chapter 4.1 from "Build Web Application with Golang" Purpose: Shows how to create a simple login using a template Run: `go run main.go`, then access `http://localhost:9090` and `http://localhost:9090/login`
Example code for Chapter 4.1 from "Build Web Application with Golang" Purpose: Shows how to create a simple login using a template Run: `go run main.go`, then access `http://localhost:9090` and `http://localhost:9090/login`
code/src/apps/ch.4.2
Example code for Chapter 4.2 from "Build Web Application with Golang" Purpose: Shows how to perform server-side validation of user input from a form.
Example code for Chapter 4.2 from "Build Web Application with Golang" Purpose: Shows how to perform server-side validation of user input from a form.
code/src/apps/ch.4.2/validator
This file contains all the validators to validate the profile page.
This file contains all the validators to validate the profile page.
code/src/apps/ch.4.3
Example code for Chapter 4.3 from "Build Web Application with Golang" Purpose: Shows how to properly escape input
Example code for Chapter 4.3 from "Build Web Application with Golang" Purpose: Shows how to properly escape input
code/src/apps/ch.4.4
Example code for Chapter 3.2 from "Build Web Application with Golang" Purpose: Shows how to prevent duplicate submissions by using tokens Example code for Chapter 4.4 based off the code from Chapter 4.2 Run `go run main.go` then access http://localhost:9090
Example code for Chapter 3.2 from "Build Web Application with Golang" Purpose: Shows how to prevent duplicate submissions by using tokens Example code for Chapter 4.4 based off the code from Chapter 4.2 Run `go run main.go` then access http://localhost:9090
code/src/apps/ch.4.4/nonce
A nonce is a number or string used only once.
A nonce is a number or string used only once.
code/src/apps/ch.4.4/validator
This file contains all the validators to validate the profile page.
This file contains all the validators to validate the profile page.
code/src/apps/ch.4.5
Example code for Chapter 4.5 Purpose is to create a server to handle uploading files.
Example code for Chapter 4.5 Purpose is to create a server to handle uploading files.
code/src/apps/ch.4.5/nonce
A nonce is a number or string used only once.
A nonce is a number or string used only once.
code/src/apps/ch.4.5/validator
This file contains all the validators to validate the profile page.
This file contains all the validators to validate the profile page.
code/src/apps/ch.5.2
Example code for Chapter 5.2 from "Build Web Application with Golang" Purpose: Use SQL driver to perform simple CRUD operations.
Example code for Chapter 5.2 from "Build Web Application with Golang" Purpose: Use SQL driver to perform simple CRUD operations.
code/src/apps/ch.5.3
Example code for Chapter 5.3 from "Build Web Application with Golang" Purpose: Shows how to run simple CRUD operations using a sqlite driver
Example code for Chapter 5.3 from "Build Web Application with Golang" Purpose: Shows how to run simple CRUD operations using a sqlite driver
code/src/apps/ch.5.4
Example code for Chapter 5.4 from "Build Web Application with Golang" Purpose: Show how to perform CRUD operations using a postgres driver
Example code for Chapter 5.4 from "Build Web Application with Golang" Purpose: Show how to perform CRUD operations using a postgres driver
code/src/apps/ch.5.5
Example code for Chapter 5.5 Purpose is to show to use BeeDB ORM for basic CRUD operations for sqlite3
Example code for Chapter 5.5 Purpose is to show to use BeeDB ORM for basic CRUD operations for sqlite3
code/src/apps/ch.5.6/mongodb
Example code for Chapter 5.6 from "Build Web Application with Golang" Purpose: Shows you have to perform basic CRUD operations for a mongodb driver.
Example code for Chapter 5.6 from "Build Web Application with Golang" Purpose: Shows you have to perform basic CRUD operations for a mongodb driver.
code/src/apps/ch.5.6/redis
Example code for Chapter 5.6 from "Build Web Application with Golang" Purpose: Shows you have to perform basic CRUD operations for a redis driver.
Example code for Chapter 5.6 from "Build Web Application with Golang" Purpose: Shows you have to perform basic CRUD operations for a redis driver.
code/src/mymath
Example code for Chapter 1.2 from "Build Web Application with Golang" Purpose: Shows how to create a simple package called `mymath` This package must be imported from another go file to run.
Example code for Chapter 1.2 from "Build Web Application with Golang" Purpose: Shows how to create a simple package called `mymath` This package must be imported from another go file to run.

Jump to

Keyboard shortcuts

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