Correct link section of zh-tw version translation

This commit is contained in:
Bi-Ruei, Chiu
2019-06-22 23:41:28 +08:00
parent 14c733b987
commit 9fa89a44aa
95 changed files with 195 additions and 195 deletions

View File

@@ -19,5 +19,5 @@ Go 是一種編譯型語言,它結合了解釋型語言的遊刃有餘,動
![](images/navi1.png)
## links
* [目錄](<preface.md>)
* 下一節: [安裝 Go](<01.1.md>)
* [目錄](<preface.md>)
* 下一節[安裝 Go](<01.1.md>)

View File

@@ -202,5 +202,5 @@ brew install mercurial //可選安裝
## links
* [目錄](<preface.md>)
* 上一節: [Go 環境配置](<01.0.md>)
* 下一節: [GOPATH 與工作空間](<01.2.md>)
* 上一節[Go 環境配置](<01.0.md>)
* 下一節[GOPATH 與工作空間](<01.2.md>)

View File

@@ -186,6 +186,6 @@ go get 本質上可以理解為首先第一步是透過原始碼工具 clone 程
## links
* [目錄](<preface.md>)
* 上一節: [安裝 Go](<01.1.md>)
* 下一節: [GO 命令](<01.3.md>)
* [目錄](<preface.md>)
* 上一節[安裝 Go](<01.1.md>)
* 下一節[GO 命令](<01.3.md>)

View File

@@ -207,5 +207,5 @@ gofmt 的參數介紹
## links
* [目錄](<preface.md>)
* 上一節: [GOPATH 與工作空間](<01.2.md>)
* 下一節: [Go 開發工具](<01.4.md>)
* 上一節[GOPATH 與工作空間](<01.2.md>)
* 下一節[Go 開發工具](<01.4.md>)

View File

@@ -640,5 +640,5 @@ Eclipse 也是非常常用的開發利器,以下介紹如何使用 Eclipse 來
## links
* [目錄](<preface.md>)
* 上一節: [Go 命令](<01.3.md>)
* 下一節: [總結](<01.5.md>)
* 上一節[Go 命令](<01.3.md>)
* 下一節[總結](<01.5.md>)

View File

@@ -4,5 +4,5 @@
## links
* [目錄](<preface.md>)
* 上一節: [Go 開發工具](<01.4.md>)
* 下一章: [Go 語言基礎](<02.0.md>)
* 上一節[Go 開發工具](<01.4.md>)
* 下一章[Go 語言基礎](<02.0.md>)

View File

@@ -15,5 +15,5 @@ Go 是一門類似 C 的編譯型語言,但是它的編譯速度非常快。
## links
* [目錄](<preface.md>)
* 上一章: [第一章總結](<01.5.md>)
* 下一節: [你好Go](<02.1.md>)
* 上一章[第一章總結](<01.5.md>)
* 下一節[你好Go](<02.1.md>)

View File

@@ -49,5 +49,5 @@ Go 使用`package`(和 Python 的模組類似)來組織程式碼。`main.mai
## links
* [目錄](<preface.md>)
* 上一節: [Go 語言基礎](<02.0.md>)
* 下一節: [Go 基礎](<02.2.md>)
* 上一節[Go 語言基礎](<02.0.md>)
* 下一節[Go 基礎](<02.2.md>)

View File

@@ -534,5 +534,5 @@ string ""
## links
* [目錄](<preface.md>)
* 上一章: [你好,Go](<02.1.md>)
* 下一節: [流程和函式](<02.3.md>)
* 上一節:[你好,Go](<02.1.md>)
* 下一節[流程和函式](<02.3.md>)

View File

@@ -560,5 +560,5 @@ fmt.Println("hello world")
## links
* [目錄](<preface.md>)
* 上一章: [Go 基礎](<02.2.md>)
* 下一節: [struct 型別](<02.4.md>)
* 上一節:[Go 基礎](<02.2.md>)
* 下一節[struct 型別](<02.4.md>)

View File

@@ -222,5 +222,5 @@ func main() {
## links
* [目錄](<preface.md>)
* 上一章: [流程和函式](<02.3.md>)
* 下一節: [物件導向](<02.5.md>)
* 上一節:[流程和函式](<02.3.md>)
* 下一節[物件導向](<02.5.md>)

View File

@@ -341,5 +341,5 @@ func main() {
## links
* [目錄](<preface.md>)
* 上一章: [struct 型別](<02.4.md>)
* 下一節: [interface](<02.6.md>)
* 上一節:[struct 型別](<02.4.md>)
* 下一節[interface](<02.6.md>)

View File

@@ -435,5 +435,5 @@ v.SetFloat(7.1)
## links
* [目錄](<preface.md>)
* 上一章: [物件導向](<02.5.md>)
* 下一節: [併發](<02.7.md>)
* 上一節:[物件導向](<02.5.md>)
* 下一節[併發](<02.7.md>)

View File

@@ -262,5 +262,5 @@ runtime 套件中有幾個處理 goroutine 的函式:
## links
* [目錄](<preface.md>)
* 上一章: [interface](<02.6.md>)
* 下一節: [總結](<02.8.md>)
* 上一節:[interface](<02.6.md>)
* 下一節[總結](<02.8.md>)

View File

@@ -28,5 +28,5 @@ continue for import return var
## links
* [目錄](<preface.md>)
* 上一節: [併發](<02.7.md>)
* 下一章: [Web 基礎](<03.0.md>)
* 上一節[併發](<02.7.md>)
* 下一章[Web 基礎](<03.0.md>)

View File

@@ -7,5 +7,5 @@
## links
* [目錄](<preface.md>)
* 上一章: [第二章總結](<02.8.md>)
* 下一節: [Web 工作方式](<03.1.md>)
* 上一章[第二章總結](<02.8.md>)
* 下一節[Web 工作方式](<03.1.md>)

View File

@@ -159,5 +159,5 @@ Keep-Alive 不會永久保持連線,它有一個保持時間,可以在不同
## links
* [目錄](<preface.md>)
* 上一節: [Web 基礎](<03.0.md>)
* 下一節: [Go 建立一個 Web 伺服器](<03.2.md>)
* 上一節[Web 基礎](<03.0.md>)
* 下一節[Go 建立一個 Web 伺服器](<03.2.md>)

View File

@@ -64,5 +64,5 @@ func main() {
## links
* [目錄](<preface.md>)
* 上一節: [Web 工作方式](<03.1.md>)
* 下一節: [Go 如何使得 web 工作](<03.3.md>)
* 上一節[Web 工作方式](<03.1.md>)
* 下一節[Go 如何使得 web 工作](<03.3.md>)

View File

@@ -86,5 +86,5 @@ func (srv *Server) Serve(l net.Listener) error {
## links
* [目錄](<preface.md>)
* 上一節: [GO 建立一個簡單的 web 服務](<03.2.md>)
* 下一節: [Go 的 http 套件詳解](<03.4.md>)
* 上一節[GO 建立一個簡單的 web 服務](<03.2.md>)
* 下一節[Go 的 http 套件詳解](<03.4.md>)

View File

@@ -206,5 +206,5 @@ func main() {
## links
* [目錄](<preface.md>)
* 上一節: [Go 如何使得 web 工作](<03.3.md>)
* 下一節: [小結](<03.5.md>)
* 上一節[Go 如何使得 web 工作](<03.3.md>)
* 下一節[小結](<03.5.md>)

View File

@@ -5,5 +5,5 @@
## links
* [目錄](<preface.md>)
* 上一節: [Go 的 http 套件詳解](<03.4.md>)
* 下一章: [表單](<04.0.md>)
* 上一節[Go 的 http 套件詳解](<03.4.md>)
* 下一章[表單](<04.0.md>)

View File

@@ -21,5 +21,5 @@ HTTP 協議是一種無狀態的協議,那麼如何才能辨別是否是同一
## links
* [目錄](<preface.md>)
* 上一章: [第三章總結](<03.5.md>)
* 下一節: [處理表單的輸入](<04.1.md>)
* 上一章[第三章總結](<03.5.md>)
* 下一節[處理表單的輸入](<04.1.md>)

View File

@@ -107,6 +107,6 @@ fmt.Println(v["friend"])
>Request 本身也提供了 FormValue()函式來取得使用者提交的參數。如 r.Form["username"]也可寫成 r.FormValue("username")。呼叫 r.FormValue 時會自動呼叫 r.ParseForm所以不必提前呼叫。r.FormValue 只會回傳同名參數中的第一個,若參數不存在則回傳空字串。
## links
* [目錄](<preface.md>)
* 上一節: [表單](<04.0.md>)
* 下一節: [驗證表單的輸入](<04.2.md>)
* [目錄](<preface.md>)
* 上一節[表單](<04.0.md>)
* 下一節[驗證表單的輸入](<04.2.md>)

View File

@@ -176,5 +176,5 @@ if m, _ := regexp.MatchString(`^(\d{17})([0-9]|X)$`, r.Form.Get("usercard")); !m
## links
* [目錄](<preface.md>)
* 上一節: [處理表單的輸入](<04.1.md>)
* 下一節: [預防跨站指令碼](<04.3.md>)
* 上一節[處理表單的輸入](<04.1.md>)
* 下一節[預防跨站指令碼](<04.3.md>)

View File

@@ -68,5 +68,5 @@ err = t.ExecuteTemplate(out, "T", "<script>alert('you have been pwned')</script>
## links
* [目錄](<preface.md>)
* 上一節: [驗證的輸入](<04.2.md>)
* 下一節: [防止多次提交表單](<04.4.md>)
* 上一節[驗證的輸入](<04.2.md>)
* 下一節[防止多次提交表單](<04.4.md>)

View File

@@ -56,5 +56,5 @@ func login(w http.ResponseWriter, r *http.Request) {
## links
* [目錄](<preface.md>)
* 上一節: [預防跨站指令碼](<04.3.md>)
* 下一節: [處理檔案上傳](<04.5.md>)
* 上一節[預防跨站指令碼](<04.3.md>)
* 下一節[處理檔案上傳](<04.5.md>)

View File

@@ -157,5 +157,5 @@ func main() {
## links
* [目錄](<preface.md>)
* 上一節: [防止多次提交表單](<04.4.md>)
* 下一節: [小結](<04.6.md>)
* 上一節[防止多次提交表單](<04.4.md>)
* 下一節[小結](<04.6.md>)

View File

@@ -5,5 +5,5 @@
## links
* [目錄](<preface.md>)
* 上一節: [處理檔案上傳](<04.5.md>)
* 下一章: [訪問資料庫](<05.0.md>)
* 上一節[處理檔案上傳](<04.5.md>)
* 下一章[訪問資料庫](<05.0.md>)

View File

@@ -12,5 +12,5 @@ Go 沒有內建的驅動支援任何的資料庫,但是 Go 定義了 database/
## links
* [目錄](<preface.md>)
* 上一章: [第四章總結](<04.6.md>)
* 下一節: [database/sql 介面](<05.1.md>)
* 上一章[第四章總結](<04.6.md>)
* 下一節[database/sql 介面](<05.1.md>)

View File

@@ -216,5 +216,5 @@ type DB struct {
## links
* [目錄](<preface.md>)
* 上一節: [訪問資料庫](<05.0.md>)
* 下一節: [使用 MySQL 資料庫](<05.2.md>)
* 上一節[訪問資料庫](<05.0.md>)
* 下一節[使用 MySQL 資料庫](<05.2.md>)

View File

@@ -137,5 +137,5 @@ stmt.Exec()函式用來執行 stmt 準備好的 SQL 語句
## links
* [目錄](<preface.md>)
* 上一節: [database/sql 介面](<05.1.md>)
* 下一節: [使用 SQLite 資料庫](<05.3.md>)
* 上一節[database/sql 介面](<05.1.md>)
* 下一節[使用 SQLite 資料庫](<05.3.md>)

View File

@@ -118,5 +118,5 @@ func checkErr(err error) {
## links
* [目錄](<preface.md>)
* 上一節: [使用 MySQL 資料庫](<05.2.md>)
* 下一節: [使用 PostgreSQL 資料庫](<05.4.md>)
* 上一節[使用 MySQL 資料庫](<05.2.md>)
* 下一節[使用 PostgreSQL 資料庫](<05.4.md>)

View File

@@ -130,5 +130,5 @@ func checkErr(err error) {
## links
* [目錄](<preface.md>)
* 上一節: [使用 SQLite 資料庫](<05.3.md>)
* 下一節: [使用 Beego orm 函式庫進行 ORM 開發](<05.5.md>)
* 上一節[使用 SQLite 資料庫](<05.3.md>)
* 下一節[使用 Beego orm 函式庫進行 ORM 開發](<05.5.md>)

View File

@@ -446,5 +446,5 @@ func (m *User) Query(name string) user []User {
## links
* [目錄](<preface.md>)
* 上一節: [使用 PostgreSQL 資料庫](<05.4.md>)
* 下一節: [NOSQL 資料庫操作](<05.6.md>)
* 上一節[使用 PostgreSQL 資料庫](<05.4.md>)
* 下一節[NOSQL 資料庫操作](<05.6.md>)

View File

@@ -205,5 +205,5 @@ func main() {
## links
* [目錄](<preface.md>)
* 上一節: [使用 Beego orm 函式庫進行 ORM 開發](<05.5.md>)
* 下一節: [小結](<05.7.md>)
* 上一節[使用 Beego orm 函式庫進行 ORM 開發](<05.5.md>)
* 下一節[小結](<05.7.md>)

View File

@@ -7,5 +7,5 @@
## links
* [目錄](<preface.md>)
* 上一節: [NOSQL 資料庫操作](<05.6.md>)
* 下一章: [session 和資料儲存](<06.0.md>)
* 上一節[NOSQL 資料庫操作](<05.6.md>)
* 下一章[session 和資料儲存](<06.0.md>)

View File

@@ -9,5 +9,5 @@ Web 開發中一個很重要的議題就是如何做好使用者的整個瀏覽
## links
* [目錄](<preface.md>)
* 上一章: [第五章總結](<05.7.md>)
* 下一節: [session 和 cookie](<06.1.md>)
* 上一章[第五章總結](<05.7.md>)
* 下一節[session 和 cookie](<06.1.md>)

View File

@@ -107,5 +107,5 @@ session 機制本身並不複雜,然而其實現和配置上的靈活性卻使
## links
* [目錄](<preface.md>)
* 上一節: [session 和資料儲存](<06.0.md>)
* 下一節: [Go 如何使用 session](<06.2.md>)
* 上一節[session 和資料儲存](<06.0.md>)
* 下一節[Go 如何使用 session](<06.2.md>)

View File

@@ -225,5 +225,5 @@ func (manager *Manager) GC() {
## links
* [目錄](<preface.md>)
* 上一節: [session 和 cookie](<06.1.md>)
* 下一節: [session 儲存](<06.3.md>)
* 上一節[session 和 cookie](<06.1.md>)
* 下一節[session 儲存](<06.3.md>)

View File

@@ -135,5 +135,5 @@ func init() {
## links
* [目錄](<preface.md>)
* 上一節: [Go 如何使用 session](<06.2.md>)
* 下一節: [預防 session 劫持](<06.4.md>)
* 上一節[Go 如何使用 session](<06.2.md>)
* 下一節[預防 session 劫持](<06.4.md>)

View File

@@ -89,5 +89,5 @@ session 啟動後,我們設定了一個值,用於記錄產生 sessionID 的
## links
* [目錄](<preface.md>)
* 上一節: [session 儲存](<06.3.md>)
* 下一節: [小結](<06.5.md>)
* 上一節[session 儲存](<06.3.md>)
* 下一節[小結](<06.5.md>)

View File

@@ -2,5 +2,5 @@
這章我們學習了什麼是 session什麼是 cookie以及他們兩者之間的關係。但是目前 Go 官方標準套件裡面不支援 session所以我們設計了一個 session 管理器,實現了 session 從建立到刪除的整個過程。然後定義了 Provider 的介面,使得可以支援各種後端的 session 儲存,然後我們在第三小節裡面介紹了如何使用記憶體儲存來實現 session 的管理。第四小節我們講解了 session 劫持的過程,以及我們如何有效的來防止 session 劫持。透過這一章的講解,希望能夠讓讀者了解整個 sesison 的執行原理以及如何實現,而且是如何更加安全的使用 session。
## links
* [目錄](<preface.md>)
* 上一節: [session 儲存](<06.4.md>)
* 下一章: [文字處理](<07.0.md>)
* 上一節[session 儲存](<06.4.md>)
* 下一章[文字處理](<07.0.md>)

View File

@@ -8,5 +8,5 @@ XML 是目前很多標準介面的互動語言,很多時候和一些 Java 編
## links
* [目錄](<preface.md>)
* 上一章: [第六章總結](<06.5.md>)
* 下一節: [XML 處理](<07.1.md>)
* 上一章[第六章總結](<06.5.md>)
* 下一節[XML 處理](<07.1.md>)

View File

@@ -233,5 +233,5 @@ func main() {
## links
* [目錄](<preface.md>)
* 上一節: [文字處理](<07.0.md>)
* 下一節: [Json 處理](<07.2.md>)
* 上一節[文字處理](<07.0.md>)
* 下一節[Json 處理](<07.2.md>)

View File

@@ -239,5 +239,5 @@ Marshal 函式只有在轉換成功的時候才會回傳資料,在轉換的過
## links
* [目錄](<preface.md>)
* 上一節: [XML 處理](<07.1.md>)
* 下一節: [正則處理](<07.3.md>)
* 上一節[XML 處理](<07.1.md>)
* 下一節[正則處理](<07.3.md>)

View File

@@ -249,5 +249,5 @@ func main() {
## links
* [目錄](<preface.md>)
* 上一節: [Json 處理](<07.2.md>)
* 下一節: [範本處理](<07.4.md>)
* 上一節[Json 處理](<07.2.md>)
* 下一節[範本處理](<07.4.md>)

View File

@@ -370,5 +370,5 @@ func main() {
## links
* [目錄](<preface.md>)
* 上一節: [正則處理](<07.3.md>)
* 下一節: [檔案操作](<07.5.md>)
* 上一節[正則處理](<07.3.md>)
* 下一節[檔案操作](<07.5.md>)

View File

@@ -161,5 +161,5 @@ Go 語言裡面刪除檔案和刪除資料夾是同一個函式
## links
* [目錄](<preface.md>)
* 上一節: [範本處理](<07.4.md>)
* 下一節: [字串處理](<07.6.md>)
* 上一節[範本處理](<07.4.md>)
* 下一節[字串處理](<07.6.md>)

View File

@@ -180,5 +180,5 @@ func main() {
## links
* [目錄](<preface.md>)
* 上一節: [檔案操作](<07.5.md>)
* 下一節: [小結](<07.7.md>)
* 上一節[檔案操作](<07.5.md>)
* 下一節[小結](<07.7.md>)

View File

@@ -3,5 +3,5 @@
## links
* [目錄](<preface.md>)
* 上一節: [字串處理](<07.6.md>)
* 下一節: [Web 服務](<08.0.md>)
* 上一節[字串處理](<07.6.md>)
* 下一章:[Web 服務](<08.0.md>)

View File

@@ -16,5 +16,5 @@ Go 語言是 21 世紀的 C 語言,我們追求的是效能、簡單,所以
## links
* [目錄](<preface.md>)
* 上一章: [第七章總結](<07.7.md>)
* 下一節: [Socket 程式設計](<08.1.md>)
* 上一章[第七章總結](<07.7.md>)
* 下一節[Socket 程式設計](<08.1.md>)

View File

@@ -445,5 +445,5 @@ func checkError(err error) {
## links
* [目錄](<preface.md>)
* 上一節: [Web 服務](<08.0.md>)
* 下一節: [WebSocket](<08.2.md>)
* 上一節[Web 服務](<08.0.md>)
* 下一節[WebSocket](<08.2.md>)

View File

@@ -151,5 +151,5 @@ func main() {
## links
* [目錄](<preface.md>)
* 上一節: [Socket 程式設計](<08.1.md>)
* 下一節: [REST](<08.3.md>)
* 上一節[Socket 程式設計](<08.1.md>)
* 下一節[REST](<08.3.md>)

View File

@@ -123,5 +123,5 @@ REST 是一種架構風格,汲取了 WWW 的成功經驗:無狀態,以資
## links
* [目錄](<preface.md>)
* 上一節: [WebSocket](<08.2.md>)
* 下一節: [RPC](<08.4.md>)
* 上一節[WebSocket](<08.2.md>)
* 下一節[RPC](<08.4.md>)

View File

@@ -402,5 +402,5 @@ Go 已經提供了對 RPC 的良好支援,透過上面 HTTP、TCP、JSON RPC
## links
* [目錄](<preface.md>)
* 上一節: [REST](<08.3.md>)
* 下一節: [小結](<08.5.md>)
* 上一節[REST](<08.3.md>)
* 下一節[小結](<08.5.md>)

View File

@@ -2,5 +2,5 @@
這一章我們介紹了目前流行的幾種主要的網路應用開發方式,第一小節介紹了網路程式設計中的基礎 :Socket 程式設計,因為現在網路正在朝雲的方向快速進化,作為這一技術演進的基石的的 socket 知識,作為開發者的你,是必須要掌握的。第二小節介紹了正愈發流行的 HTML5 中一個重要的特性 WebSocket透過它伺服器可以實現主動的 push 訊息,以簡化以前 ajax 輪詢的模式。第三小節介紹了 REST 編寫模式,這種模式特別適合來開發網路應用 API目前移動應用的快速發展我覺得將來會是一個潮流。第四小節介紹了 Go 實現的 RPC 相關知識對於上面四種開發方式Go 都已經提供了良好的支援net 套件及其子套件,是所有涉及到網路程式設計的工具的所在地。如果你想更加深入的了解相關實現細節,可以嘗試閱讀這個套件下面的原始碼。
## links
* [目錄](<preface.md>)
* 上一節: [RPC](<08.4.md>)
* 下一章: [安全與加密](<09.0.md>)
* 上一節[RPC](<08.4.md>)
* 下一章[安全與加密](<09.0.md>)

View File

@@ -16,5 +16,5 @@
## links
* [目錄](<preface.md>)
* 上一章: [第八章總結](<08.5.md>)
* 下一節: [預防 CSRF 攻擊](<09.1.md>)
* 上一章[第八章總結](<08.5.md>)
* 下一節[預防 CSRF 攻擊](<09.1.md>)

View File

@@ -99,5 +99,5 @@ if token != "" {
## links
* [目錄](<preface.md>)
* 上一節: [安全與加密](<09.0.md>)
* 下一節: [確保輸入過濾](<09.2.md>)
* 上一節[安全與加密](<09.0.md>)
* 下一節[確保輸入過濾](<09.2.md>)

View File

@@ -74,5 +74,5 @@ if ok, _ := regexp.MatchString("^[a-zA-Z0-9]+$", username); ok {
## links
* [目錄](<preface.md>)
* 上一節: [預防 CSRF 攻擊](<09.1.md>)
* 下一節: [避免 XSS 攻擊](<09.3.md>)
* 上一節[預防 CSRF 攻擊](<09.1.md>)
* 下一節[避免 XSS 攻擊](<09.3.md>)

View File

@@ -52,5 +52,5 @@ XSS 漏洞是相當有危害的,在開發 Web 應用的時候,一定要記
## links
* [目錄](<preface.md>)
* 上一節: [確保輸入過濾](<09.2.md>)
* 下一節: [避免 SQL 注入](<09.4.md>)
* 上一節[確保輸入過濾](<09.2.md>)
* 下一節[避免 SQL 注入](<09.4.md>)

View File

@@ -79,5 +79,5 @@ SQL 注入攻擊的危害這麼大,那麼該如何來防治呢 ? 下面這些
## links
* [目錄](<preface.md>)
* 上一節: [避免 XSS 攻擊](<09.3.md>)
* 下一節: [儲存密碼](<09.5.md>)
* 上一節[避免 XSS 攻擊](<09.3.md>)
* 下一節[儲存密碼](<09.5.md>)

View File

@@ -95,5 +95,5 @@ dk := scrypt.Key([]byte("some password"), []byte(salt), 16384, 8, 1, 32)
## links
* [目錄](<preface.md>)
* 上一節: [確保輸入過濾](<09.4.md>)
* 下一節: [加密和解密資料](<09.6.md>)
* 上一節[確保輸入過濾](<09.4.md>)
* 下一節[加密和解密資料](<09.6.md>)

View File

@@ -125,5 +125,5 @@ type Block interface {
## links
* [目錄](<preface.md>)
* 上一節: [儲存密碼](<09.5.md>)
* 下一節: [小結](<09.7.md>)
* 上一節[儲存密碼](<09.5.md>)
* 下一節[小結](<09.7.md>)

View File

@@ -5,5 +5,5 @@
## links
* [目錄](<preface.md>)
* 上一節: [加密和解密資料](<09.6.md>)
* 下一節: [國際化和本地化](<10.0.md>)
* 上一節[加密和解密資料](<09.6.md>)
* 下一章:[國際化和本地化](<10.0.md>)

View File

@@ -21,5 +21,5 @@
## links
* [目錄](<preface.md>)
* 上一章: [第九章總結](<09.7.md>)
* 下一節: [設定預設地區](<10.1.md>)
* 上一章[第九章總結](<09.7.md>)
* 下一節[設定預設地區](<10.1.md>)

View File

@@ -94,6 +94,6 @@ if AL == "en" {
透過上面的介紹可知,設定 Locale 可以有很多種方式,我們應該根據需求的不同來選擇不同的設定 Locale 的方法,以讓使用者能以它最熟悉的方式,獲得我們提供的服務,提高應用的使用者友好性。
## links
* [目錄](<preface.md>)
* 上一節: [國際化和本地化](<10.0.md>)
* 下一節: [本地化資源](<10.2.md>)
* [目錄](<preface.md>)
* 上一節[國際化和本地化](<10.0.md>)
* 下一節[本地化資源](<10.2.md>)

View File

@@ -149,7 +149,7 @@ s1.Execute(os.Stdout, VV)
本小節介紹了如何使用及儲存本地資源,有時需要透過轉換函式來實現,有時透過 lang 來設定,但是最終都是透過 key-value 的方式來儲存 Locale 對應的資料,在需要時取出相應於 Locale 的資訊後,如果是文字資訊就直接輸出,如果是時間日期或者貨幣,則需要先透過`fmt.Printf`或其他格式化函式來處理,而對於不同 Locale 的檢視和資源則是最簡單的,只要在路徑裡面增加 lang 就可以實現了。
## links
* [目錄](<preface.md>)
* 上一節: [設定預設地區](<10.1.md>)
* 下一節: [國際化站點](<10.3.md>)
* [目錄](<preface.md>)
* 上一節[設定預設地區](<10.1.md>)
* 下一節[國際化站點](<10.3.md>)
<!-- {% endraw %} -->

View File

@@ -208,7 +208,7 @@ t.Funcs(template.FuncMap{"M": I18nMoney})
透過這小節我們知道了如何實現一個多語言套件的 Web 應用透過自訂語言套件我們可以方便的實現多語言而且透過配置檔案能夠非常方便的擴充多語言預設情況下go-i18n 會自定載入一些公共的配置資訊,例如時間、貨幣等,我們就可以非常方便的使用,同時為了支援在範本中使用這些函式,也實現了相應的範本函式,這樣就允許我們在開發 Web 應用的時候直接在範本中透過 pipeline 的方式來操作多語言套件。
## links
* [目錄](<preface.md>)
* 上一節: [本地化資源](<10.2.md>)
* 下一節: [小結](<10.4.md>)
* [目錄](<preface.md>)
* 上一節[本地化資源](<10.2.md>)
* 下一節[小結](<10.4.md>)
<!-- {% endraw %} -->

View File

@@ -1,6 +1,6 @@
# 10.4 小結
透過這一章的介紹,讀者應該對如何操作 i18n 有了深入的了解,我也根據這一章介紹的內容實現了一個開源的解決方案 go-i18nhttps://github.com/astaxie/go-i18n 透過這個開源函式庫我們可以很方便的實現多語言版本的 Web 應用,使得我們的應用能夠輕鬆的實現國際化。如果你發現這個開源函式庫中的錯誤或者那些缺失的地方,請一起參與到這個開源專案中來,讓我們的這個函式庫爭取成為 Go 的標準函式庫。
## links
* [目錄](<preface.md>)
* 上一節: [國際化站點](<10.3.md>)
* 下一節: [錯誤處理,故障排除和測試](<11.0.md>)
* [目錄](<preface.md>)
* 上一節[國際化站點](<10.3.md>)
* 下一章:[錯誤處理,故障排除和測試](<11.0.md>)

View File

@@ -15,5 +15,5 @@
## links
* [目錄](<preface.md>)
* 上一章: [第十章總結](<10.4.md>)
* 下一節: [錯誤處理](<11.1.md>)
* 上一章[第十章總結](<10.4.md>)
* 下一節[錯誤處理](<11.1.md>)

View File

@@ -237,5 +237,5 @@ func viewRecord(w http.ResponseWriter, r *http.Request) *appError {
## links
* [目錄](<preface.md>)
* 上一節: [錯誤處理,除錯和測試](<11.0.md>)
* 下一節: [使用 GDB 除錯](<11.2.md>)
* 上一節[錯誤處理,除錯和測試](<11.0.md>)
* 下一節[使用 GDB 除錯](<11.2.md>)

View File

@@ -249,5 +249,5 @@ func main() {
## links
* [目錄](<preface.md>)
* 上一節: [錯誤處理](<11.1.md>)
* 下一節: [Go 怎麼寫測試案例](<11.3.md>)
* 上一節[錯誤處理](<11.1.md>)
* 下一節[Go 怎麼寫測試案例](<11.3.md>)

View File

@@ -170,5 +170,5 @@ ok gotest 9.364s
## links
* [目錄](<preface.md>)
* 上一節: [使用 GDB 除錯](<11.2.md>)
* 下一節: [小結](<11.4.md>)
* 上一節[使用 GDB 除錯](<11.2.md>)
* 下一節[小結](<11.4.md>)

View File

@@ -3,5 +3,5 @@
## links
* [目錄](<preface.md>)
* 上一節: [Go 怎麼寫測試案例](<11.3.md>)
* 下一節: [部署與維護](<12.0.md>)
* 上一節[Go 怎麼寫測試案例](<11.3.md>)
* 下一章:[部署與維護](<12.0.md>)

View File

@@ -7,5 +7,5 @@
## links
* [目錄](<preface.md>)
* 上一章: [第十一章總結](<11.4.md>)
* 下一節: [應用日誌](<12.1.md>)
* 上一章[第十一章總結](<11.4.md>)
* 下一節[應用日誌](<12.1.md>)

View File

@@ -257,5 +257,5 @@ logs.Logger.Critical("test Critical message")
## links
* [目錄](<preface.md>)
* 上一章: [部署與維護](<12.0.md>)
* 下一節: [網站錯誤處理](<12.2.md>)
* 上一節:[部署與維護](<12.0.md>)
* 下一節[網站錯誤處理](<12.2.md>)

View File

@@ -132,6 +132,6 @@ func GetUser(uid int) (username string) {
本小節總結了當我們的 Web 應用部署之後如何處理各種錯誤:網路錯誤、資料庫錯誤、作業系統錯誤等,當錯誤發生時,我們的程式如何來正確處理:顯示友好的出錯介面、回復 (Rollback)操作、記錄日誌、通知管理員等操作,最後介紹了如何來正確處理錯誤和異常。一般的程式中錯誤和異常很容易混淆的,但是在 Go 中錯誤和異常是有明顯的區分,所以告訴我們在程式設計中處理錯誤和異常應該遵循怎麼樣的原則。
## links
* [目錄](<preface.md>)
* 上一章: [應用日誌](<12.1.md>)
* 下一節: [應用部署](<12.3.md>)
* 上一節:[應用日誌](<12.1.md>)
* 下一節[應用部署](<12.3.md>)
<!-- {% endraw %} -->

View File

@@ -188,5 +188,5 @@ Supervisord 安裝完成後有兩個可用的命令列 supervisor 和 supervisor
## links
* [目錄](<preface.md>)
* 上一章: [網站錯誤處理](<12.2.md>)
* 下一節: [備份和還原](<12.4.md>)
* 上一節:[網站錯誤處理](<12.2.md>)
* 下一節[備份和還原](<12.4.md>)

View File

@@ -172,5 +172,5 @@ redis 的還原分為熱備份還原和冷備份還原,熱備份還原的目
## links
* [目錄](<preface.md>)
* 上一章: [應用部署](<12.3.md>)
* 下一節: [小結](<12.5.md>)
* 上一節:[應用部署](<12.3.md>)
* 下一節[小結](<12.5.md>)

View File

@@ -14,5 +14,5 @@
## links
* [目錄](<preface.md>)
* 上一章: [備份和還原](<12.4.md>)
* 下一節: [如何設計一個 Web 框架](<13.0.md>)
* 上一節:[備份和還原](<12.4.md>)
* 下一章:[如何設計一個 Web 框架](<13.0.md>)

View File

@@ -8,5 +8,5 @@
## links
* [目錄](<preface.md>)
* 上一章: [第十二章總結](<12.5.md>)
* 下一節: [專案規劃](<13.1.md>)
* 上一章[第十二章總結](<12.5.md>)
* 下一節[專案規劃](<13.1.md>)

View File

@@ -49,5 +49,5 @@
本小節介紹了部落格系統從設定 GOPATH 到目錄建立這樣的基礎資訊,也簡單介紹了框架結構採用的 MVC 模式,部落格系統中資料流的執行流程,最後透過這些流程設計了部落格系統的目錄結構,至此,我們基本完成一個框架的建立,接下來的幾個小節我們將會逐個實現。
## links
* [目錄](<preface.md>)
* 上一章: [建構部落格系統](<13.0.md>)
* 下一節: [自訂路由器設計](<13.2.md>)
* 上一節:[建構部落格系統](<13.0.md>)
* 下一節[自訂路由器設計](<13.2.md>)

View File

@@ -283,5 +283,5 @@ beego.BeeApp.RegisterController("/users/:uid([0-9]+)", &controllers.UserControll
```
## links
* [目錄](<preface.md>)
* 上一章: [專案規劃](<13.1.md>)
* 下一節: [controller 設計](<13.3.md>)
* 上一節:[專案規劃](<13.1.md>)
* 下一節[controller 設計](<13.3.md>)

View File

@@ -171,6 +171,6 @@ index.tpl 的程式碼如下所示,我們可以看到資料的設定和顯示
## links
* [目錄](<preface.md>)
* 上一章: [自訂路由器設計](<13.2.md>)
* 下一節: [日誌和配置設計](<13.4.md>)
* 上一節:[自訂路由器設計](<13.2.md>)
* 下一節[日誌和配置設計](<13.4.md>)
<!-- {% endraw %} -->

View File

@@ -259,5 +259,5 @@ url ="http://www.api.com/api.html"
## links
* [目錄](<preface.md>)
* 上一章: [controller 設計](<13.3.md>)
* 下一節: [實現部落格的增刪改](<13.5.md>)
* 上一節:[controller 設計](<13.3.md>)
* 下一節[實現部落格的增刪改](<13.5.md>)

View File

@@ -277,6 +277,6 @@ edit.tpl
```
## links
* [目錄](<preface.md>)
* 上一章: [日誌和配置設計](<13.4.md>)
* 下一節: [小結](<13.6.md>)
* 上一節:[日誌和配置設計](<13.4.md>)
* 下一節[小結](<13.6.md>)
<!-- {% endraw %} -->

View File

@@ -3,5 +3,5 @@
## links
* [目錄](<preface.md>)
* 上一章: [實現部落格的增刪改](<13.5.md>)
* 下一節: [擴充套件 Web 框架](<14.0.md>)
* 上一節:[實現部落格的增刪改](<13.5.md>)
* 下一章:[擴充套件 Web 框架](<14.0.md>)

View File

@@ -8,5 +8,5 @@
## links
* [目錄](<preface.md>)
* 上一章: [第十三章總結](<13.6.md>)
* 下一節: [靜態檔案支援](<14.1.md>)
* 上一章[第十三章總結](<13.6.md>)
* 下一節[靜態檔案支援](<14.1.md>)

View File

@@ -80,5 +80,5 @@ StaticDir["/static"] = "static"
## links
* [目錄](<preface.md>)
* 上一節: [擴充套件 Web 框架](<14.0.md>)
* 下一節: [Session 支援](<14.2.md>)
* 上一節[擴充套件 Web 框架](<14.0.md>)
* 下一節[Session 支援](<14.2.md>)

View File

@@ -117,5 +117,5 @@ func (this *MainController) Get() {
## links
* [目錄](<preface.md>)
* 上一節: [靜態檔案支援](<14.1.md>)
* 下一節: [表單及驗證支援](<14.3.md>)
* 上一節[靜態檔案支援](<14.1.md>)
* 下一節[表單及驗證支援](<14.3.md>)

View File

@@ -285,6 +285,6 @@ func (this *AddController) Post() {
## links
* [目錄](<preface.md>)
* 上一節: [Session 支援](<14.2.md>)
* 下一節: [使用者認證](<14.4.md>)
* 上一節[Session 支援](<14.2.md>)
* 下一節[使用者認證](<14.4.md>)
<!-- {% endraw %} -->

View File

@@ -271,5 +271,5 @@ func (this *AddBlogController) Prepare() {
```
## links
* [目錄](<preface.md>)
* 上一節: [表單及驗證支援](<14.3.md>)
* 下一節: [多語言支援](<14.5.md>)
* 上一節[表單及驗證支援](<14.3.md>)
* 下一節[多語言支援](<14.5.md>)

View File

@@ -125,6 +125,6 @@ func (this *MainController) Get() {
```
## links
* [目錄](<preface.md>)
* 上一節: [使用者認證](<14.4.md>)
* 下一節: [pprof 支援](<14.6.md>)
* 上一節[使用者認證](<14.4.md>)
* 下一節[pprof 支援](<14.6.md>)
<!-- {% endraw %} -->

View File

@@ -112,5 +112,5 @@ go tool pprof http://localhost:8080/debug/pprof/profile
## links
* [目錄](<preface.md>)
* 上一節: [多語言支援](<14.5.md>)
* 下一節: [小結](<14.7.md>)
* 上一節[多語言支援](<14.5.md>)
* 下一節[小結](<14.7.md>)

View File

@@ -3,4 +3,4 @@
## links
* [目錄](<preface.md>)
* 上一節: [pprof 支援](<14.6.md>)
* 上一節[pprof 支援](<14.6.md>)