Skip to content

Commit d24d5c8

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 378a143 + 8f0acc3 commit d24d5c8

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

en/02.1.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ While this might seem to be a shallow problem, when the codebase grows and more
1919

2020
For other languages there are many variables when it comes to writing code. Every language is good for its use case, but Go is a little special because it was designed at a company which is the very synonym of the Internet (and distributed computing). Typically in order to optimize programs, developers choose to write Java over Python and C++ over Java, but almost all available languages widely in use were written decades ago when 1GB storage was much pricier. Now storage and computing is relatively cheap and computers are getting multiples cores, but the "old languages" are not harnessing concurrency in a way that go does. It's not because those languages are bad; utilizing concurrency wasn't a relevant usecase while the older languages evolved.
2121

22-
To mitigate all the problems that Google faced with current tools, they wrote a systems language called Go which you are about to learn! There are many advantages to using golang and there are disadvantages too, for every coin has both sides. One of the significant improvements in in code formatting. Google has designed the language to avoid debates on code formatting. Go code written by anyone in the world (assuming they know and use `gofmt`) will look exactly the same. This won't seem to matter until you work in a team! Also when the company uses automated code review or some other fancy technique, the formatted code may break in other languages which don't have strict and standard formatting rules, but not in go!
22+
To mitigate all the problems that Google faced with current tools, they wrote a systems language called Go which you are about to learn! There are many advantages to using golang and there are disadvantages too, for every coin has both sides. One of the significant improvements is in code formatting. Google has designed the language to avoid debates on code formatting. Go code written by anyone in the world (assuming they know and use `gofmt`) will look exactly the same. This won't seem to matter until you work in a team! Also when the company uses automated code review or some other fancy technique, the formatted code may break in other languages which don't have strict and standard formatting rules, but not in go!
2323

2424
Go was designed with concurrency in mind, please note that parallelism != concurrency, there is an [amazing post](https://blog.golang.org/concurrency-is-not-parallelism) by Rob Pike on the [golang blog](https://blog.golang.org/), you will find it there, it is worth a read.
2525

en/05.2.md

+2
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ The following example shows how to operate on a database based on the `database/
8080
fmt.Println(department)
8181
fmt.Println(created)
8282
}
83+
84+
rows.Close()
8385

8486
// delete
8587
stmt, err = db.Prepare("delete from userinfo where uid=?")

tr/02.2.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Aslında bu çözümünde yeterince basit olmadığını biliyorum. Bakalım dah
3838

3939
Şimdi daha iyi gibi.`:=` kullanarak `var` ve `type` ihmal edilebiliyor, buna öz ifade deniyor. Ama bir dakika, tek bir şart var: bu yöntemi sadece fonksiyon içinde kullanabilirsiniz. Fonksiyon gövdesi dışında kullanırsanız derleme hatası alırsnız. Bundan dolayı, global değişkenler için `var` kullanıyoruz ve kısa tanımalar içinde `var()` anahtar kelimesini.
4040

41-
`_` (boş) özel bir değişken ismi. Verilen her değer yoksayılır. Örneğin, `35`değerini `b`'ye' atıyoruz ve`34` değerini yoksayıyoruz.( ***Bu örnek sadece nasıl çalıştığını gösteriyor. Genelde fonksiyonlardan dönen değerleri yoksaymak iiçin kullanıyoruz*** )
41+
`_` (boş) özel bir değişken ismi. Verilen her değer yoksayılır. Örneğin, `35`değerini `b`'ye' atıyoruz ve`34` değerini yoksayıyoruz.( ***Bu örnek sadece nasıl çalıştığını gösteriyor. Genelde fonksiyonlardan dönen değerleri yoksaymak için kullanıyoruz*** )
4242

4343
_, b := 34, 35
4444

zh/05.5.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ func init() {
221221

222222

223223
```
224-
>注意一点,beego orm针对驼峰命名会自动帮你转化成下划线字段,例如你定义了Struct名字为`User`,那么转化成底层实现的时候是`user_info`,字段命名也遵循该规则。
224+
>注意一点,beego orm针对驼峰命名会自动帮你转化成下划线字段,例如你定义了Struct名字为`UserInfo`,那么转化成底层实现的时候是`user_info`,字段命名也遵循该规则。
225225
226226
## 插入数据
227227
下面的代码演示了如何插入一条记录,可以看到我们操作的是struct对象,而不是原生的sql语句,最后通过调用Insert接口将数据保存到数据库。

0 commit comments

Comments
 (0)