From 780f1445655b7b5fc2e7d75c5411850d5207b82c Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Thu, 4 Jun 2015 20:35:28 +1000 Subject: [PATCH] typos fixed --- en/01.4.md | 6 +++--- en/02.2.md | 2 +- en/02.3.md | 2 +- en/02.6.md | 2 +- en/04.2.md | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/en/01.4.md b/en/01.4.md index d56bef42..8126d76e 100644 --- a/en/01.4.md +++ b/en/01.4.md @@ -86,7 +86,7 @@ LiteIDE features. Replace `GOROOT=$HOME/go` to your Go installation path, save it. - $GOPATH - $GOPATH is the path that contains a list of projects. Open the command tool (or press `Ctrl+` in LiteIDE), then type `go help gopath` for more details. + $GOPATH is the path that contains a list of projects. Open the command tool (or press ``Ctrl+` ``in LiteIDE), then type `go help gopath` for more details. It's very easy to view and change $GOPATH in LiteIDE. Follow `View - Setup GOPATH` to view and change these values. ## Sublime Text @@ -106,11 +106,11 @@ Here I'm going to introduce you the Sublime Text 2 (Sublime for short) + GoSubli Figure 1.6 Sublime project management - Syntax highlight -- Free trial forever with no functional limitations. You may be prompted once in a while to remind you to purchase a licnese, but you can simply ignore it if you wish. Of course, if you do find that it enhances your productivity and you really enjoy using it, please purchase a copy of it and support its continued development! +- Free trial forever with no functional limitations. You may be prompted once in a while to remind you to purchase a license, but you can simply ignore it if you wish. Of course, if you do find that it enhances your productivity and you really enjoy using it, please purchase a copy of it and support its continued development! First, download the version of [Sublime](http://www.sublimetext.com/) suitable for your operating system. -1. Press `Ctrl+`, open the command tool and input the following commands. +1. Press ``Ctrl+` ``, open the command tool and input the following commands. import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation' diff --git a/en/02.2.md b/en/02.2.md index 6e6f245f..21b7952e 100644 --- a/en/02.2.md +++ b/en/02.2.md @@ -250,7 +250,7 @@ The reason that Go is concise because it has some default behaviors. in `[n]type`, `n` is the length of the array, `type` is the type of its elements. Like other languages, we use `[]` to get or set element values within arrays. - var arr [10]int // an array of type int + var arr [10]int // an array of type [10]int arr[0] = 42 // array is 0-based arr[1] = 13 // assign value to element fmt.Printf("The first element is %d\n", arr[0]) // get element value, it returns 42 diff --git a/en/02.3.md b/en/02.3.md index 7d976bfb..7a53f80b 100644 --- a/en/02.3.md +++ b/en/02.3.md @@ -15,7 +15,7 @@ The greatest invention in programming is flow control. Because of them, you are if x > 10 { fmt.Println("x is greater than 10") } else { - fmt.Println("x is less than 10") + fmt.Println("x is less than or equal to 10") } The most useful thing concerning `if` in Go is that it can have one initialization statement before the conditional statement. The scope of the variables defined in this initialization statement are only available inside the block of the defining `if`. diff --git a/en/02.6.md b/en/02.6.md index e1b91a83..40167fac 100644 --- a/en/02.6.md +++ b/en/02.6.md @@ -181,7 +181,7 @@ An empty interface is an interface that doesn't contain any methods, so all type a = i a = s -If a function uses an empty interface as its argument type, it can accept any type; if a function uses empty as its return value type, it can return any type. +If a function uses an empty interface as its argument type, it can accept any type; if a function uses empty interface as its return value type, it can return any type. ### Method arguments of an interface diff --git a/en/04.2.md b/en/04.2.md index 291e4657..b46ca24f 100644 --- a/en/04.2.md +++ b/en/04.2.md @@ -12,7 +12,7 @@ Sometimes we require that users input some fields but they don't, for example in // code for empty field } -`r.Form` treats different form element types differently when they are blank. For empty textboxes, text areas and file uploads, it returns an empty string; for radio buttons and check boxes, it doesn't even create the corresponding items. Instead, you will get errors if you try to access it. Therefore, it's safer to use `r.Form.Get()` to get filed values since it will always return empty if the value does not exist. On the other hand, `r.Form.Get()` can only get one field value at a time, so you need to use `r.Form` to get the map of values. +`r.Form` treats different form element types differently when they are blank. For empty textboxes, text areas and file uploads, it returns an empty string; for radio buttons and check boxes, it doesn't even create the corresponding items. Instead, you will get errors if you try to access it. Therefore, it's safer to use `r.Form.Get()` to get field values since it will always return empty if the value does not exist. On the other hand, `r.Form.Get()` can only get one field value at a time, so you need to use `r.Form` to get the map of values. ## Numbers