Return to book
Review this book
About the author
Introduction
1.
Go Environment Configuration
1.1.
Installation
1.2.
$GOPATH and workspace
1.3.
Go commands
1.4.
Go development tools
1.5.
Summary
2.
Go basic knowledge
2.1.
Hello, Go
2.2.
Go foundation
2.3.
Control statements and functions
2.4.
struct
2.5.
Object-oriented
2.6.
interface
2.7.
Concurrency
2.8.
Summary
3.
Web foundation
3.1.
Web working principles
3.2.
Build a simple web server
3.3.
How Go works with web
3.4.
Get into http package
3.5.
Summary
4.
HTTP Form
4.1.
Process form inputs
4.2.
Validation of inputs
4.3.
Cross site scripting
4.4.
Duplicate submissions
4.5.
File upload
4.6.
Summary
5.
Database
5.1.
database/sql interface
5.2.
How to use MySQL
5.3.
How to use SQLite
5.4.
How to use PostgreSQL
5.5.
How to use beedb ORM
5.6.
NOSQL
5.7.
Summary
6.
Data storage and session
6.1.
Session and cookies
6.2.
How to use session in Go
6.3.
Session storage
6.4.
Prevent hijack of session
6.5.
Summary
7.
Text files
7.1.
XML
7.2.
JSON
7.3.
Regexp
7.4.
Templates
7.5.
Files
7.6.
Strings
7.7.
Summary
8.
Web services
8.1.
Sockets
8.2.
WebSocket
8.3.
REST
8.4.
RPC
8.5.
Summary
9.
Security and encryption
9.1.
CSRF attacks
9.2.
Filter inputs
9.3.
XSS attacks
9.4.
SQL injection
9.5.
Password storage
9.6.
Encrypt and decrypt data
9.7.
Summary
10.
Internationalization and localization
10.1.
Time zone
10.2.
Localized resources
10.3.
International sites
10.4.
Summary
11.
Error handling, debugging and testing
11.1.
Error handling
11.2.
Debugging by using GDB
11.3.
Write test cases
11.4.
Summary
12.
Deployment and maintenance
12.1.
Logs
12.2.
Errors and crashes
12.3.
Deployment
12.4.
Backup and recovery
12.5.
Summary
13.
Build a web framework
13.1.
Project program
13.2.
Customized routers
13.3.
Design controllers
13.4.
Logs and configurations
13.5.
Add, delete and update blogs
13.6.
Summary
14.
Develop web framework
14.1.
Static files
14.2.
Session
14.3.
Form
14.4.
User validation
14.5.
Multi-language support
14.6.
pprof
14.7.
Summary
15.
References
16.
preface
Published using GitBook
A
A
Serif
Sans
White
Sepia
Night
Twitter
Google
Facebook
Weibo
Instapaper
build-web-application-with-golang
1.
Go environment configuration
1.1.
Installation
1.2.
$GOPATH and workspace
1.3.
Go commands
1.4.
Go development tools
1.5.
Summary
2.
Go basic knowledge
2.1.
"Hello, Go"
2.2.
Go foundation
2.3.
Control statements and functions
2.4.
struct
2.5.
Object-oriented
2.6.
interface
2.7.
Concurrency
2.8.
Summary
3.
Web foundation
3.1.
Web working principles
3.2.
Build a simple web server
3.3.
How Go works with web
3.4.
Get into http package
3.5.
Summary
4.
User form
4.1.
Process form inputs
4.2.
Verification of inputs
4.3.
Cross site scripting
4.4.
Duplicate submissions
4.5.
File upload
4.6.
Summary
5.
Database
5.1.
database/sql interface
5.2.
MySQL
5.3.
SQLite
5.4.
PostgreSQL
5.5.
Develop ORM based on beedb
5.6.
NoSQL database
5.7.
Summary
6.
Data storage and session
6.1.
Session and cookies
6.2.
How to use session in Go
6.3.
Session storage
6.4.
Prevent hijack of session
6.5.
Summary
7.
Text files
7.1.
XML
7.2.
JSON
7.3.
Regexp
7.4.
Templates
7.5.
Files
7.6.
Strings
7.7.
Summary
8.
Web services
8.1.
Sockets
8.2.
WebSocket
8.3.
REST
8.4.
RPC
8.5.
Summary
9.
Security and encryption
9.1.
CSRF attacks
9.2.
Filter inputs
9.3.
XSS attacks
9.4.
SQL injection
9.5.
Password storage
9.6.
Encrypt and decrypt data
9.7.
Summary
10.
Internationalization and localization
10.1
Time zone
10.2
Localized resources
10.3
International sites
10.4
Summary
11.
Error handling, debugging and testing
11.1.
Error handling
11.2.
Debugging by using GDB
11.3.
Write test cases
11.4.
Summary
12.
Deployment and maintenance
12.1.
Logs
12.2.
Errors and crashes
12.3.
Deployment
12.4.
Backup and recovery
12.5.
Summary
13.
Build a web framework
13.1.
Project program
13.2.
Customized routers
13.3.
Design controllers
13.4.
Logs and configurations
13.5.
Add, delete and update blogs
13.6.
Summary
14.
Develop web framework
14.1.
Static files
14.2.
Session
14.3.
Form
14.4.
User validation
14.5.
Multi-language support
14.6.
pprof
14.7.
Summary
Appendix A
References