Webapps-in-Go-the-anti-textbook


-
go语言开发教程,go web开发电子书 Webapps in Go go go 电子书
Tweet this book! Please help Suraj Patil by spreading the word about this book on Twitter The suggested tweet for this book is just bought Webapps in Go by (@igeeko The suggested hashtag for this book is#WebDev goanti Textbook Find out what other people are saying about the book by clicking on this link to search for this hashtag on twitter https://twitter.com/searchq=#webdevgoanTitextbook Akshay Agarwal: For introducing me to the FOSS world Hrishikesh Nandedkar: For guiding me in the right direction Contents Installation ystem requirements Install the go tools Tools The toolchain Hello. go Why go? Variables data structures 12 Variables 12 Underlying data structures 16 Important points.·,, 17 array;slce,map· 19 Control statements and functions 28 Control statement 28 Functions 31 Struct 41 Basics of struct Object-oriented 48 methods 48 Interface 57 Interface 57 Concurrency 68 Managing the Workspace 74 Pa ackages 74 Internal deployment 75 Web Programming Basics 77 CONTENTS Http Methods What is a template?···,, Static files 81 Basic web application 83 Handling URLs Serving static files 85 Homework 86 Designing our web app 87 The design 87 Homework 89 Using databases in Go 90 Creating and configuring database 90 Installing sqlite dr Accessing the database 93 Importing driver 93 Retrieving result sets ·······.···· 95 Fetching Data from the Database How Scano Works Preparing queries 88 Single-Row Queries Modifying Data and Using Transactions 101 Statements that Modify Data 101 Working with Transactions 102 Using Prepared Statements 104 Prepared Statements And Connections ····· 104 Avoiding Prepared Statements 104 Prepared Statements in Transactions 105 Parameter Placeholder Syntax 106 Handling Errors ,107 Errors From Iterating Resultsets 107 Errors From Closing resultsets 107 Errors From Query Row 108 Identifying Specific Database Errors 109 Handling Connection Errors 110 Working with NULLs 111 CONTENTS Working with Unknown Columns ,113 The connection pool 115 Surprises, Antipatterns and Limitations ,,,,116 Resource exhaustion 116 Large uint64 values 翻D 116 Connection State mismatch 117 Database-Specific Syntax 117 Multiple result sets 117 Invoking Stored Procedures 117 Multiple Statement Support 118 Database Encapsulation ,120 An Example 123 Homework 126 Working with Forms ..127 CSRF 130 Input validation 00D0 0 ,,135 Uploading files 137 Templates 140 Sub templating 142 Homework 148 Authentication .149 Cook 149 Sessions 150 Users ··· 154 Files 158 Routing ,160 Middlewares ,162 Example ,,163 Building an apt 165 JWT 166 Making an api call 168 Formatting a son document 170 Testing API 170 CONTENTS Writing an client 172 Getting the token 172 Error handling 173 Example 173 Advanced usage 175 Unit Testing 176 Version Control basics 80 Using gi 180 Branching 181 Remote 182 Installation If you know about installation or have installed Go, you can skip to Tools This chapter is taken from install pagez verbatim, except for the changes to be made to adapt to this book's styling format System requirements Go binary distributions are available for these supported operating systems and architectures. Please ensure your system meets these requirements before proceeding If your Os or architecture is not on the list, you may be able to install from source or use gccgo instead perating system Architectures Notes Freebsd 8-sTABle or later amd64 Debian gnu/ kFreeBSD not supported Linux 2.6.23 or later with glibc amd64, 386, arm CentOS/RHEL 5.x not supported; install from source for ARm Mac osⅩ10.7 or later amdo use the clang or gcc that comes with Xcode Windows xp or later amd64,386 use Mingw gcc. No need for cygwin or msys tgcc is required only if you plan to use cgo fYou only need to install the command line tools for Xcode. If you have already ins 4.3+, you can install it from the Components tab of the Downloads preferences pane talled Xcode Install the go tools If you are upgrading from an older version of go you must first remove the existing version. Linux, Mac os x and freebsd tarballs Download the archive and extract it into /usr/local, creating a Go tree in /usr/local/go. For example tar -C /usr/local -xzf gosVERSION $OS-$ARCH. tar. gz 0. tools. md https:/golang.org/doc/install Installation Choose the archive file appropriate for your installation. For instance, if you are installing Go version 1.2.1 for 64-bit x86 on Linux, the archive you want is called go1. 2.1. linux-amd64. tar. gz (Typically these commands must be run as root or through sudo. Add/usr/local/go/bin to the Path environment variable. You can do this by adding this line to your /etc/profile(for a system-wide installation) or SHOME/ profile export PAtH=SPATH /usr/local/go/bin Installing to a custom location The Go binary distributions assume they will be installed in /usr/local/go(or c: \Go under Windows), but it is possible to install the Go tools to a different location. In this case you must set the groot environment variable to point to the directory in which it was installed For example, if you installed Go to your home directory you should add the following commands to $HOME/profile export GOROOT=SHOME/go export PAtH=$PATH: $GOROoT/bin Note: GOROOT must be set only when installing to a custom location Mac os x package installer Download the package file, open it, and follow the prompts to install the Go tools. The package installs the Go distribution to /usr/local/go The package should put the /usr/local/go/bin directory in your PATH environment variable You may need to restart any open Terminal sessions for the change to take effect Windows The Go project provides two installation options for Windows users(besides installing from source) a zip archive that requires you to set some environment variables and an MSi installer that configures your installation automatically MSI installer Open the msi file and follow the prompts to install the Go tools. By default, the installer puts the Go distribution in c: Go The installer should put thec: \Go\bin directory in your PATH environment variable. You may need to restart any open command prompts for the change to take effect

20.44MB
red5-1.0.0-webapps-demos.zip
2017-11-15r下载后,解压,把解压后的文件直接放入到red5webaaps下
266KB
webapps-s21-assignment-5-VarshithReddyBairy:GitHub Classroom创建的webapps-s21-assignment-5-VarshithReddyBairy-源码
2021-02-25WebApps-S21-作业-5
1.94MB
webapps-s21-assignment-5-amulyamallepalli:GitHub课堂创建的webapps-s21-assignment-5-amulyamallepalli-源码
2021-02-21WebApps-S21-作业-5
300KB
apache-activemq-5.15.2下的demo
2017-12-26Apache-activemq的目录下有一个官方的例子,webapps-demo
851KB
webapps-s21-assignment-5-Sharada-N:webapps-s21-assignment-5-Sharada-N由GitHub Classroom创建-源码
2021-02-25WebApps-S21-作业-5
436KB
webapps-s21-assignment-5-vineetha-batchu:GitHub Classroom创建的webapps-s21-assignment-5-vineetha-batchu-源码
2021-02-25WebApps-S21-作业-5
1KB
webapps-s21-assignment-5-JayaShankarM97:webapps-s21-assignment-5-JayaShankarM97由GitHub Classroom创建-源码
2021-02-20WebApps-S21-作业-5
165KB
webapps-s21-assignment-5-Satyachowdary97:webapps-s21-assignment-5-Satyachowdary97由GitHub Classroom创建-源码
2021-02-25WebApps-S21-作业-5
198KB
webapps-s21-assignment-5-AbhiRam0099:webapps-s21-assignment-5-AbhiRam0099由GitHub Classroom创建-源码
2021-02-21WebApps-S21-作业-5
1.7MB
webapps-s21-assignment-5-Dhanushagoud:GitHub Classroom创建的webapps-s21-assignment-5-Dhanushagoud-源码
2021-02-25WebApps-S21-作业-5 托管在
774KB
webapps-s21-assignment-5-hemanth8056:GitHub Classroom创建的webapps-s21-assignment-5-hemanth8056-源码
2021-02-25WebApps-S21-作业-5
1KB
webapps-s21-assignment-5-yaswantS542297:GitHub课堂创建的webapps-s21-assignment-5-yaswantS542297-源码
2021-02-20WebApps-S21-作业-5
1KB
webapps-s21-assignment-5-S542301:GitHub教室创建的webapps-s21-assignment-5-S542301-源码
2021-02-19WebApps-S21-作业-5
1.43MB
webapps-s21-assignment-5-anela123:GitHub课堂创建的webapps-s21-assignment-5-anela123-源码
2021-02-25WebApps-S21-作业-5
334KB
webapps-s21-assignment-3-PariveshitaThota:webapps-s21-assignment-3-PariveshitaThota由GitHub Classroom创建-源码
2021-02-11WebApps-S21-作业-3 作业3-基本HTML
38KB
webapps-s21-assignment-3-Saisumithra:webapps-s21-assignment-3-Saisumithra,由GitHub Classroom创建-源码
2021-02-10WebApps-S21-作业-3 作业3-基本HTML
1KB
webapps-s21-assignment-4-HimajaParachuri:webapps-s21-assignment-4-HimajaParachuri由GitHub Classroom创建-源码
2021-02-12WebApps-S21-作业-4 使用CSS进行HTML练习
59KB
webapps-s21-assignment-3-snasam:由GitHub Classroom创建的webapps-s21-assignment-3-snasam-源码
2021-02-08WebApps-S21-作业-3 作业3-基本HTML
3KB
webapps-s21-assignment-4-KeerthiMuli:GitHub Classroom创建的webapps-s21-assignment-4-KeerthiMuli-源码
2021-02-16WebApps-S21-作业-4 使用CSS进行HTML练习
-
下载
ssh2_AddPage 4:21:2021.zip
ssh2_AddPage 4:21:2021.zip
-
下载
kj-第12章文件.ppt
kj-第12章文件.ppt
-
下载
study_test_java
study_test_java
-
下载
2021年天津师范大学331社会工作原理考研真题
2021年天津师范大学331社会工作原理考研真题
-
下载
Python文件操作.txt
Python文件操作.txt
-
下载
Cpuz_x32.zip
Cpuz_x32.zip
-
下载
Arduino IDE 2.0 版本
Arduino IDE 2.0 版本
-
下载
项目管理工作流程.doc
项目管理工作流程.doc
-
下载
NET Framework 3.5下载_.NET Framework 3.5离线安装包官方下载「sp1」-太平洋下载中心@2051_38126.exe
NET Framework 3.5下载_.NET Framework 3.5离线安装包官方下载「sp1」-太平洋下载中心@2051_38126.exe
-
下载
2021年西北政法大学437社会工作实务考研真题
2021年西北政法大学437社会工作实务考研真题
